Hello all, In the snippet attached below, you will see a function I use to allow for coding music and dynamics which do not necessarily have the same moments.
It works wonderfully for me — saves typing, keeps the code clean and manageable, etc. — and I want to keep using it [or something similar]. HOWEVER, when using partcombine, it fails in unexpected ways (in this case by *partly* working). I’m guessing the problem is related to one or more of the “known issues” (cf. http://lilypond.org/doc/v2.19/Documentation/notation/multiple-voices#automatic-part-combining) — in particular, “All \partcombine… functions can only accept two voices” and/or [most likely] “\partcombine keeps all spanners (slurs, ties, hairpins, etc.) in the same Voice so that if any such spanners start or end in a different Voice, they may not be printed properly or at all”, and/or maybe even “If the \partcombine function cannot combine both music expressions (i.e., when both voices have different durations), it will give the voices, internally, its own custom names: one and two respectively. This means if there is any “switch” to a differently named Voice context, the events in that differently named Voice will be ignored”. Regardless, I’m hoping someone can suggest how to recode or replace the \splitDyn function so that it works when using partcombine. Many thanks, Kieren. %%% SNIPPET BEGINS \version "2.19.46" \paper { line-width = 4\in ragged-right = ##f } splitDyn = #(define-music-function (notestuff dynstuff) (ly:music? ly:music?) #{ << { $notestuff } { $dynstuff } >> #}) musicA = { \splitDyn { c''1 } { s4\> s\! s\< s\! } } musicB = { \splitDyn { e''1 } { s4\> s\! s\< s\! } } \markup "Works:" \new Staff \musicA \markup "Fails:" \new Staff \partcombine \musicA \musicB %%% SNIPPET ENDS ________________________________ Kieren MacMillan, composer ‣ website: www.kierenmacmillan.info ‣ email: i...@kierenmacmillan.info _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user