lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cadenza_and_accidentals-take2


From: address@hidden
Subject: Re: cadenza_and_accidentals-take2
Date: Sun, 29 Mar 2015 19:30:31 +0000 (GMT)


----- Original Message -----
> From: "Jim Long" <address@hidden>
> To: address@hidden
> Cc: "Noeck" <address@hidden>, address@hidden
> Sent: Sunday, March 29, 2015 2:51:41 AM
> Subject: Re: cadenza_and_accidentals-take2
> 
> On Sat, Mar 28, 2015 at 07:45:51PM +0000, address@hidden wrote:
> > 
> > ----- Original Message -----
> > > From: "Noeck" <address@hidden>
> > > 
> > > A naive question: Could the \cadenzaOff command be changed in a way that
> > > it automatically implies the end of a measure at that point.
> > 
> > I can think of instances where the end of a cadenza might not be at the end
> > of a measure.
> 
> I am speculating wildly, and I also am not generally a cadenza
> user, but perhaps \cadenzaOff could also be made to cooperate
> with \partial:
> 
> % simple case, without \partial:
> 
> \cadenzaOn
> 
> % lots of notes go here
> 
> \cadenzaOff
> 
> % a bar line appears here, and beat 1 follows
> 
> | c1
> | c1
> 
> \bar "|."
> 
> Or:
> 
> % a less simple case, using \partial:
> 
> \cadenzaOn
> 
> % lots of notes go here
> 
> \cadenzaOff
> 
> \partial 4.
> 
> b'8 c'' d''
> 
> % a bar line appears here, and beat 1 follows
> 
> | c1
> | c1
> 
> \bar "|."
> 
> 
> 
> 

This discussion got me motivated me to experiment a bit.  I haven't had much 
cause to use cadenzas much, either.  After playing with this I realized that 
the reason I was having accidental troubles following a cadenza was that, in 
this case, the cadenza was at the end of a measure.  Once the measure is full, 
LilyPond draws a barline even if it is invisible.  That leads to potential 
accidental issues.

Jim's speculation about \cadenzoOff being made to cooperate with \partial is 
maybe second-cousin to my solution below.  I reasoned that the problem with a 
cadenza at the end of a measure is that LilyPond has already drawn the barline. 
 The solution?  Don't *be* at the end of the measure just yet.  Using 
\scaleDurations I leave a bit of measure left at the end of the cadenza, toss 
in a skip and then Lily draws a barline.  No problems with bar numbres or 
accidentals.

It's a bit of a kludge, but all I have to do is scale the measure, add the 
skip, and everything else takes care of itself.  This might be a bit cumbersome 
in a large score, but I'm only dealing with a single line.

-David


%%%%%
\version "2.18.0"

startCadenza = {
  \cadenzaOn
  \teeny
  \stemUp
}

endCadenza = {
  \cadenzaOff
  \normalsize
  \stemNeutral
}


\score {
  {
    \override Score.BarNumber.break-visibility = ##(#t #t #t)
    c'2.^\markup{ Cadenza in the middle of a bar, no problem }
    \startCadenza
    d'16-[ f' e' g'-] a'-[ g' f' d'-]
    %  \set Timing.measurePosition = #(ly:make-moment 2/4)
    \endCadenza
    g'4
    c'1
  }
}


\score {
  {
    c'1^\markup{ Cadenza at the beginning of a bar, no problem }
    \override Score.BarNumber.break-visibility = ##(#t #t #t)
    \startCadenza
    d'16-[ f' e' g'-] a'-[ g' f' d'-]
    \endCadenza
    cis'2.
    g'4
    c'1
  }
}


\score {
  {
    \override Score.BarNumber.break-visibility = ##(#t #t #t)
    c'1^\markup {
      \column {
        "Cadenza at the end of a bar requires manipulation."
        "Time management still leaves accidental trouble"
        "Bar numbers may also be affected"
      } 
    }
    cis'2.
    \set Timing.measurePosition = #(ly:make-moment 1/4)
    g'4
    %    \bar ""
    \startCadenza
    d'16-[ f' e' g'-] a'-[ g' f' d'-]
    \endCadenza
    \bar "|"
    \set Timing.measurePosition = #(ly:make-moment 0/4)
    c'4 c' c' c'
  }
}

\score {
  {
    \override Score.BarNumber.break-visibility = ##(#t #t #t)
    c'1^\markup {
      \column {
        "Cadenza at the end of a bar requires manipulation."
        "Using \scaleDurations with a skip at the end works well."
        "Bar numbering remains unaffected and accidentals are well-behaved."
      } 
    }
    \scaleDurations 63/64 { % scale the whole mesure down a bit
      cis'2.
      \startCadenza
      d'16-[ f' e' g'-] a'-[ g' f' d'-]
      \endCadenza
      g'4 
      %    \bar ""
      \startCadenza
      d'16-[ f' e' g'-] a'-[ g' f' d'-]
      \endCadenza
    }
    s64 % add a skip at the very end
    \bar "|"
    c'1
  }
}
%%%%%



reply via email to

[Prev in Thread] Current Thread [Next in Thread]