Hi John,

Am 23.07.20 um 13:21 schrieb John Burt:
While the second tenor part is singing a cadenza, the first tenor and the baritone parts are holding a note as long as the cadenza. I now how to make a rest a long as a cadenza -- #(mmrest-of-length MyCadenza) but I don't know how to do this with a note. Is there a way?

Maybe:

\version "2.21.0"

with-length-of =
% \with-lengths-of \ref \mus typesets \mus compressed to the
% duration of \ref.
#(define-music-function (ref mus) (ly:music? ly:music?)
   (ly:music-compress mus
                      (ly:moment-div
                       (ly:music-length ref)
                       (ly:music-length mus))))

test = { c'4. d'4 }

<<
  \new Staff  {
    \with-length-of \test { c'8 d' e' f' } g'[ a b]
  }
  \new Staff {
    \test e'8 f' d'
  }
>>

% ----------------------------------------------------

soloCadenza = \relative {
  a'4 g8[ f] e[ d] e[ f] a,4 b e4. d8
}

<<
  \new Staff  {
    \with-length-of \soloCadenza <b d' f' g'>1
    <c' e' g'>1
  }
  \new Staff {
    \cadenzaOn
    \soloCadenza
    \cadenzaOff \bar "|"
    c'4 e'8 g' c''2
  }
>>

Best
Lukas


Reply via email to