]> git.donarmstrong.com Git - lilypond.git/commitdiff
partcombine: wait to apply forced strategies until parts are synched
authorKeith OHara <k-ohara5a5a@oco.net>
Mon, 1 Dec 2014 05:43:57 +0000 (21:43 -0800)
committerKeith OHara <k-ohara5a5a@oco.net>
Sat, 6 Dec 2014 18:16:03 +0000 (10:16 -0800)
issue 4061

input/regression/part-combine-force-once.ly
scm/part-combiner.scm

index 6b784513dc1fbff9a5fed011d5ecccec51e35c1f..76a230b7e835f477ff3ad7b5c769233d2513cba2 100644 (file)
@@ -16,6 +16,7 @@ mI = \relative c' {
        c \partcombineUnisonoOnce c c c |
        \partcombineAutomatic \partcombineSoloIOnce r2 c4 c |
        \partcombineSoloIIOnce R1 |
+       d'2 \partcombineChordsOnce d4^"1 chord" d|
 }
 mII = \relative c' {
        c4 \partcombineApartOnce c c c |
@@ -23,6 +24,7 @@ mII = \relative c' {
        c c c c |
        R1 |
        r2 c4 c |
+       b4 b b b |
 }
 
 \score {
index 83a5a2e3306c4cc01b74df051db93f783e9a9326..4b65ea04ca8aa46143f1006680f62db162303ccb 100644 (file)
@@ -319,9 +319,11 @@ LilyPond version 2.8 and earlier."
       (if (< result-idx (vector-length result))
           (let* ((now-state (vector-ref result result-idx)) ; current result
                  ;; Extract all part-combine force events
-                 (ev1 (part-combine-events (car (voice-states now-state))))
-                 (ev2 (part-combine-events (cdr (voice-states now-state))))
-                 (evts (append ev1 ev2))
+                 (evts (if (synced? now-state)
+                           (append
+                            (part-combine-events (car (voice-states now-state)))
+                            (part-combine-events (cdr (voice-states now-state))))
+                           '()))
                  ;; result is (once-state permament-state):
                  (state (fold forced-result (cons 'automatic prev-res) evts))
                  ;; Now let once override permanent changes: