]> git.donarmstrong.com Git - lilypond.git/blobdiff - ly/music-functions-init.ly
Issue 4348: Part combiner: move direction handling out of iterator
[lilypond.git] / ly / music-functions-init.ly
index 9b1d36623baf9f115aa09fe774b51e3c29e02b97..cbba26a65256a366e3c2793cebb641e91d18266b 100644 (file)
@@ -1131,24 +1131,36 @@ a music expression containing simultaneous voices, where @var{part1}
 and @var{part2} are combined into one voice where appropriate.
 Optional @var{chord-range} sets the distance in steps between notes
 that may be combined into a chord or unison.")
-   (make-part-combine-music parser
-                            (list part1 part2) #f chord-range))
+   #{ \context Staff <<
+        \context Voice = "one" \with { \voiceOne } {}
+        \context Voice = "two" \with { \voiceTwo } {}
+        \context Voice = "shared" {}
+        #(make-part-combine-music parser (list part1 part2) #f chord-range)
+      >> #} )
 
 partcombineUp =
 #(define-music-function (parser location chord-range part1 part2)
    ((number-pair? '(0 . 8)) ly:music? ly:music?)
    (_i "Take the music in @var{part1} and @var{part2} and typeset so
 that they share a staff with stems directed upward.")
-   (make-part-combine-music parser
-                            (list part1 part2) UP chord-range))
+   #{ \context Staff <<
+        \context Voice = "one" \with { \voiceOne } {}
+        \context Voice = "two" \with { \voiceThree } {}
+        \context Voice = "shared" \with { \voiceOne } {}
+        #(make-part-combine-music parser (list part1 part2) UP chord-range)
+      >> #} )
 
 partcombineDown =
 #(define-music-function (parser location chord-range part1 part2)
    ((number-pair? '(0 . 8)) ly:music? ly:music?)
    (_i "Take the music in @var{part1} and @var{part2} and typeset so
 that they share a staff with stems directed downward.")
-   (make-part-combine-music parser
-                            (list part1 part2) DOWN chord-range))
+   #{ \context Staff <<
+        \context Voice = "one" \with { \voiceFour } {}
+        \context Voice = "two" \with { \voiceTwo } {}
+        \context Voice = "shared" \with { \voiceTwo } {}
+        #(make-part-combine-music parser (list part1 part2) DOWN chord-range)
+      >> #} )
 
 partcombineForce =
 #(define-music-function (location parser type once) (boolean-or-symbol? boolean?)