Adding an ottava marking to a single voice: Difference between revisions
Appearance
Import snippet from LSR |
m New category |
||
| (2 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
If you have more than one voice on the staff, setting octavation in one voice transposes the position of notes in all voices for the duration of the ottava bracket. If the octavation is only intended to apply to one voice, the <code>Ottava_spanner_engraver</code> should be moved to <code>Voice</code> context. | If you have more than one voice on the staff, setting octavation in one voice transposes the position of notes in all voices for the duration of the ottava bracket. If the octavation is only intended to apply to one voice, the <code>Ottava_spanner_engraver</code> should be moved to <code>Voice</code> context. | ||
<lilypond version="2.24 | <lilypond version="2.24"> | ||
\layout { | \layout { | ||
\context { | \context { | ||
| Line 32: | Line 32: | ||
[[Category:Tweaks and overrides]] | [[Category:Tweaks and overrides]] | ||
[[Category:Included in the official documentation]] | [[Category:Included in the official documentation]] | ||
[[Category:Snippet]] | |||
Latest revision as of 23:15, 21 November 2025
If you have more than one voice on the staff, setting octavation in one voice transposes the position of notes in all voices for the duration of the ottava bracket. If the octavation is only intended to apply to one voice, the Ottava_spanner_engraver should be moved to Voice context.
\version "2.24"
\layout {
\context {
\Staff
\remove Ottava_spanner_engraver
}
\context {
\Voice
\consists Ottava_spanner_engraver
}
}
{
\clef bass
<< { <g d'>1~ q2 <c' e'> }
\\
{
r2.
\ottava -1
<b,,, b,,>4 ~ |
q2
\ottava 0
<c e>2
}
>>
}