bug-lilypond
[Top][All Lists]
Advanced

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

Re: \cadenzaOff and accidentals


From: David Kastrup
Subject: Re: \cadenzaOff and accidentals
Date: Mon, 05 Mar 2012 10:13:21 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux)

David Bobroff <address@hidden> writes:

> I'm re-framing my query regarding accidental behavior following
> \cadenzaOff.  After some discussion about this on bug- it is quite
> clear that '\cadenzaOff' *only* affects counting/timing and '\bar'
> *only* paints a graphic of a bar line.  Currently, if an accidental
> appears in the cadenza it will be visibly canceled if the key
> signature value of the note is used in the next "measure" even if
> \cadenzaOff \bar "|."' is present.  Musically this should not happen.
> Since a bar line has gone by the key signature is back in force.
>
> This post in on -user to see if anyone has a solution; how do I
> suppress the accidental cancellation in the following example?
>
> I've posted this to bug- to suggest that LilyPond should probably
> understand this.
>
> Example:
>
> %%%
> \version "2.14.2"
>
> \relative c'
> {
>   \key c \major
>   \time 2/4
>   c2 ~
>   \cadenzaOn
>   c4 \teeny d8-[ es f g-] \normalsize a4-\fermata
>   \cadenzaOff
>   \bar "|"
>   e2 % how to suppress accidental cancellation here?
> }
> %%%
>
> -David

\version "2.15.20"

\relative c'
{
  \key c \major
  \time 2/4
  c2 ~
  \cadenzaOn
  c4 \teeny d8-[ es f g-] \normalsize a4-\fermata
  \cadenzaOff
  \bar "|"
  \once\accidentalStyle forget
  e2 % how to suppress accidental cancellation here?
}

Note the version number.  \once worked for complex stuff with 2.15.17,
and the \accidentalStyle syntax comes with 2.15.20.  There will be
solutions for versions earlier than that, but I don't care getting
myself educated about them.

The real fix would be to mess with the Timing in a way that the \bar "|"
is not necessary.  One way is to switch the cadenza off one note early
and let the last note take a full measure:

\relative c'
{
  \key c \major
  \time 2/4
  c2 ~
  \cadenzaOn c4 \teeny d8-[ es f g-]
  \cadenzaOff \normalsize a4*2-\fermata
  e2 % how to suppress accidental cancellation here?
}

-- 
David Kastrup




reply via email to

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