Jump to content

Changing the ambitus gap: Difference between revisions

From LilyPond wiki
m Replace version="2.24.0" with version="2.24" now that the LilyWiki extension supports auto-selecting the latest release in a stable series
No edit summary
Line 37: Line 37:


[[Category:Pitches]]
[[Category:Pitches]]
[[Category:Included in the official documentation]]
[[Category:Included in the official documentation]][[Category:Snippet]]

Revision as of 22:48, 21 November 2025

It is possible to change the default gap between the ambitus noteheads and the line joining them.

\version "2.24"

\layout {
  \context {
    \Voice
    \consists "Ambitus_engraver"
  }
}

\new Staff {
  \time 2/4
  % Default setting
  c'4 g''
}

\new Staff {
  \time 2/4
  \override AmbitusLine.gap = 0
  c'4 g''
}

\new Staff {
  \time 2/4
  \override AmbitusLine.gap = 1
  c'4 g''
}

\new Staff {
  \time 2/4
  \override AmbitusLine.gap = 1.5
  c'4 g''
}

\paper { tagline = ##f }