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* 

I’m guessing the problem is related to one or more of the “known issues” (cf. 
 — 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,

\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

Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info

lilypond-user mailing list

Reply via email to