Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
LilyPond wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Two \partCombine pairs on one staff
Page
Discussion
English
Read
Edit
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
Edit source
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
The <code>\partCombine</code> function takes two music expressions each containing a part, and distributes them among four <code>Voice</code>s named “two”, “one”, “solo”, and “chords” depending on when and how the parts are merged into a common voice. The voices output from <code>\partCombine</code> can have their layout properties adjusted in the usual way. Here we define extensions of <code>\partCombine</code> to make it easier to put four voices on a staff. The original version can be input as follows. <pre>soprano = { d'4 | cis' b e' d'8 cis' | cis'2 b } alto = { fis4 | e8 fis gis ais b4 b | b ais fis2 } tenor = { a8 b | cis' dis' e'4 b8 cis' d'4 | gis cis' dis'2 } bass = { fis8 gis | a4 gis g fis | eis fis b,2 } \new Staff << \key b\minor \clef alto \partial 4 \transpose b b' \partCombineUp \soprano \alto \partCombineDown \tenor \bass >></pre> And here is the extended snippet. <lilypond version="2.24"> \layout { \context { \Staff \accepts "VoiceBox" } \context { \name "VoiceBox" \type "Engraver_group" \defaultchild "Voice" \accepts "Voice" \accepts "NullVoice" } } customPartCombineUp = #(define-music-function (partOne partTwo) (ly:music? ly:music?) "Take the music in @var{partOne} and @var{partTwo} and return a @code{VoiceBox} named @q{Up} containing @code{Voice}s that contain @var{partOne} and @var{partTwo} merged into one voice where feasible. This variant sets the default voicing in the output to use upward stems." #{ \new VoiceBox = "Up" << \context Voice = "one" { \voiceOne } \context Voice = "two" { \voiceThree } \context Voice = "shared" { \voiceOne } \context Voice = "solo" { \voiceOne } \context NullVoice = "null" {} \partCombine #partOne #partTwo >> #}) customPartCombineDown = # (define-music-function (partOne partTwo) (ly:music? ly:music?) "Take the music in @var{partOne} and @var{partTwo} and return a @code{VoiceBox} named @q{Down} containing @code{Voice}s that contain @var{partOne} and @var{partTwo} merged into one voice where feasible. This variant sets the default voicing in the output to use downward stems." #{ \new VoiceBox = "Down" << \set VoiceBox.soloText = #"Solo III" \set VoiceBox.soloIIText = #"Solo IV" \context Voice ="one" { \voiceFour } \context Voice ="two" { \voiceTwo } \context Voice ="shared" { \voiceFour } \context Voice ="solo" { \voiceFour } \context NullVoice = "null" {} \partCombine #partOne #partTwo >> #}) soprano = { d'4 | cis' b e' d'8 cis' | cis'2 b } alto = { fis4 | e8 fis gis ais b4 b | b ais fis2 } tenor = { a8 b | cis' dis' e'4 b8 cis' d'4 | gis cis' dis'2 } bass = { fis8 gis | a4 gis g fis | eis fis b,2 } \new Staff << \key b\minor \clef alto \partial 4 \transpose b b' \customPartCombineUp \soprano \alto \customPartCombineDown \tenor \bass >> </lilypond> [[Category:Scheme]] [[Category:Simultaneous notes]] [[Category:Staff notation]] [[Category:Included in the official documentation]] [[Category:Snippet]]
Summary:
Please note that all contributions to LilyPond wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Meta:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Two \partCombine pairs on one staff
Add topic