Urs Liska <u...@openlilylib.org> writes:

> But I often have to do things like
>
> <<
>   {
>     \voiceOne d'4 \oneVoice r \voiceOne d'
>   }
>   \new Voice {
>     \voiceTwo d4 s d
>   }
>>>

For this purpose I once wrote a function:

  \dual {
    g'4 \rr4 g'
  } {
    d'4 s d'
  }

-- Johan

rr =
#(define-music-function
   (parser location dur)
   (ly:duration?)
   #{ \oneVoice #(make-music 'RestEvent 'duration dur) \voiceOne #}
 )

dual =
#(define-music-function
   (parser location one two)
   (ly:music? ly:music?)
   #{ << { \voiceOne #one }
         \new Voice { \voiceTwo #two }
      >>
      \oneVoice
   #}
 )

_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to