Here’s a trick: routing music to different voices without using the 
Part_combine_iterator.  Instead, it uses the same infrastructure as for staff 
switching.

\version "2.19.15"

\layout {
  \context {
    \name "X"
    \type "Engraver_group"
  }
  \context {
    \Voice
    \accepts "X"
  }
}

one = \relative { b'4 b b b }
two = \relative { b'4 b f f }

% TODO: Derive oneChanges and twoChanges from the result of
% determine-split-list.
oneChanges = \relative { }
twoChanges = \relative { s2 \change Voice = "1" }

\score {
  <<
    \new X << \oneChanges \one >>
  \\
    \new X << \twoChanges \two >>
  >>
}

% Note that if the change commands follow the notes, the changes do
% not happen at the intended moment.
\score {
  \new Staff \with { instrumentName = "wrong" } <<
    \new X << \one \oneChanges >>
  \\
    \new X << \two \twoChanges >>
  >>
}
— 
Dan


_______________________________________________
lilypond-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to