Additional voices to avoid collisions: Difference between revisions
Appearance
Import snippet from LSR |
m New category Tags: Mobile edit Mobile web edit |
||
| (2 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
In some instances of complex polyphonic music, additional voices are necessary to prevent collisions between notes. If more than four parallel voices are needed, additional voices can be added by defining a variable using the Scheme function <code>context-spec-music</code>. | In some instances of complex polyphonic music, additional voices are necessary to prevent collisions between notes. If more than four parallel voices are needed, additional voices can be added by defining a variable using the Scheme function <code>context-spec-music</code>. | ||
<lilypond version="2.24 | <lilypond version="2.24"> | ||
voiceFive = #(context-spec-music (make-voice-props-set 4) 'Voice) | voiceFive = #(context-spec-music (make-voice-props-set 4) 'Voice) | ||
| Line 39: | Line 39: | ||
[[Category:Simultaneous notes]] | [[Category:Simultaneous notes]] | ||
[[Category:Included in the official documentation]] | [[Category:Included in the official documentation]] | ||
[[Category:Snippet]] | |||
Latest revision as of 23:14, 21 November 2025
In some instances of complex polyphonic music, additional voices are necessary to prevent collisions between notes. If more than four parallel voices are needed, additional voices can be added by defining a variable using the Scheme function context-spec-music.
\version "2.24"
voiceFive = #(context-spec-music (make-voice-props-set 4) 'Voice)
\relative c'' {
\time 3/4
\key d \minor
\partial 2
<<
\new Voice {
\voiceOne
a4. a8
e'4 e4. e8
f4 d4. c8
}
\new Voice {
\voiceTwo
d,2
d4 cis2
d4 bes2
}
\new Voice {
\voiceThree
f'2
bes4 a2
a4 s2
}
\new Voice {
\voiceFive
s2
g4 g2
f4 f2
}
>>
}