On 12/06/2020 15:26, Peter Toye wrote:
Free rhythm in part of a bar I need to have part only of a bar notated with free rhythm. Also other staves need to be synchronised. I've tried using \cadenzaOn but then I get a barcheck problem and the next bar goes odd. I can't see anything about this in the snippets or manuals. A minimal example follows.

There seem to be two issues:

1) How do I get the desired result, which is one bar with the first 2 crotchets synchronised with the bass, and the rest unsynchronised?

2) This isn't in the example, but what if I want a free section within a bar, but synchronised accompaniment at the beginning and end of the bar (e.g. a chord on the final note of a cadenza).

Maybe something like this will help. The fillbar function scales a semi-breve rest to the right duration to fill up the remainder of the bar.

\version "2.20.0"

fillbar =
#(define-music-function (cadenza) (ly:music?)
  (ly:music-compress #{ r1\fermata #} (ly:music-length cadenza)))

cadenza = { c'8 8 8 8 8 8 8 8 8 8 }

\score {
  <<
    \new Staff {
      \time 4/4
      c'4 4 4 4 |
      \cadenzaOn c'4 4 \cadenza \bar "|" \cadenzaOff
      R1
    }

    \new Staff {
      \time 4/4
      \clef "bass"
      c1
      4 4
      \fillbar \cadenza
      R1
    }
  >>
}


--
Timothy Lanfear, Bristol, UK.


Reply via email to