Changing the interval of lines on the stave: Difference between revisions
Appearance
Import snippet from LSR |
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 |
||
| Line 1: | Line 1: | ||
<code>staffLineLayoutFunction</code> is used to change the position of notes. This snippet shows setting its value to <code>ly:pitch-semitones</code> in order to produce a chromatic scale with the distance between each space and line of the stave equal to one semitone. | <code>staffLineLayoutFunction</code> is used to change the position of notes. This snippet shows setting its value to <code>ly:pitch-semitones</code> in order to produce a chromatic scale with the distance between each space and line of the stave equal to one semitone. | ||
<lilypond version="2.24 | <lilypond version="2.24"> | ||
scale = \relative c' { | scale = \relative c' { | ||
a4 ais b c | a4 ais b c | ||
Revision as of 18:45, 16 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
}
>>
}