Changing the interval of lines on the stave: Difference between revisions
Appearance
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 |
m New category |
||
| (One intermediate revision by the same user not shown) | |||
| Line 26: | Line 26: | ||
[[Category:Included in the official documentation]] | [[Category:Included in the official documentation]] | ||
[[Category:Pitches]] | [[Category:Pitches]] | ||
[[Category:Snippet]] | |||
Latest revision as of 23:33, 21 November 2025
staffLineLayoutFunction is used to change the position of notes. This snippet shows setting its value to ly:pitch-semitones in order to produce a chromatic scale with the distance between each space and line of the stave equal to one semitone.
\version "2.24"
scale = \relative c' {
a4 ais b c
cis4 d dis e
f4 fis g gis
a1
}
\new Staff \with {
\remove "Accidental_engraver"
staffLineLayoutFunction = #ly:pitch-semitones
}
{
<<
\scale
\context NoteNames {
\set printOctaveNames = ##f
\scale
}
>>
}