From d20e6f3542b828f647ee06f4a0b27714280784e6 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Wed, 31 Mar 2004 10:49:00 +0000 Subject: [PATCH] * scm/part-combiner.scm (determine-split-list): split for voice crossings * input/regression/part-combine-cross.ly: new file. * scm/part-combiner.scm (make-part-combine-music): don't do relative inside partcombine arguments. --- ChangeLog | 5 +++++ input/regression/part-combine-cross.ly | 16 ++++++++++++++++ input/regression/part-combine.ly | 1 + scm/part-combiner.scm | 11 +++++++++-- 4 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 input/regression/part-combine-cross.ly diff --git a/ChangeLog b/ChangeLog index e0a20fd85a..09041daa4c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2004-03-31 Han-Wen Nienhuys + * scm/part-combiner.scm (determine-split-list): split for voice + crossings + + * input/regression/part-combine-cross.ly: new file. + * scm/part-combiner.scm (make-part-combine-music): don't do relative inside partcombine arguments. diff --git a/input/regression/part-combine-cross.ly b/input/regression/part-combine-cross.ly new file mode 100644 index 0000000000..5565a88992 --- /dev/null +++ b/input/regression/part-combine-cross.ly @@ -0,0 +1,16 @@ + +\header { + texidoc ="The part combiner stays apart for crossing voices. +" + } + +\version "2.1.36" + +vone = \notes \relative a' { g4 g f f e e d d } +vtwo = \notes \relative a' { e4 e f f g g a a } + +\score { + \partcombine \vone \vtwo + \paper { raggedright = ##t } +} + diff --git a/input/regression/part-combine.ly b/input/regression/part-combine.ly index fb2820dcb4..383c2c9158 100644 --- a/input/regression/part-combine.ly +++ b/input/regression/part-combine.ly @@ -21,5 +21,6 @@ vtwo = \notes \relative a' { f2 f4 f f2 g4 g c, f f f f f~ f ~ f \score { \partcombine \vone \vtwo + \paper { raggedright = ##t } } diff --git a/scm/part-combiner.scm b/scm/part-combiner.scm index 99c28ea577..c7cca04df9 100644 --- a/scm/part-combiner.scm +++ b/scm/part-combiner.scm @@ -264,8 +264,15 @@ Only set if not set previously. (if (and (= (length pitches1) (length pitches2))) (if (and (pair? pitches1) (pair? pitches2) - (< chord-threshold (ly:pitch-steps - (ly:pitch-diff (car pitches1) (car pitches2))))) + (or + (< chord-threshold (ly:pitch-steps + (ly:pitch-diff (car pitches1) + (car pitches2)))) + + ;; voice crossings: + (> 0 (ly:pitch-steps (ly:pitch-diff (car pitches1) + (car pitches2)))) + )) (put 'apart) ;; copy previous split state from spanner state (begin -- 2.39.5