lilypond-user
[Top][All Lists]
Advanced

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

Re: setting accidental style


From: Paul Scott
Subject: Re: setting accidental style
Date: Wed, 26 Jul 2006 14:08:36 -0700
User-agent: Thunderbird 1.5.0.4 (X11/20060713)

Jon Wild wrote:
On Wed, 26 Jul 2006, Paul Scott wrote:

Where should I insert the line

#(set-accidental-style 'no-reset)

in my .ly file, in order to have accidentals be remembered across barlines?

I tried outside the /book block, inside the /book block but outside the /score block, and inside the /score block. Each time I got the error "syntax error, unexpected MUSIC_IDENTIFIER"

I can get it to compile with this but I don't know if it gives you what you want. There are no notes in the second "bar" that have the same accicentals as notes in the first "bar". This assuming you are thinking of each whole chord as a 4/4 bar.

\book {
\score {
  <<
    \new Staff{
  #(set-accidental-style 'no-reset)
  { <c' des' ees'>1 <d' e' f'>1 }
    }
  >>
  \layout {
    ragged-right = ##t
    \context {
  \Staff
  \remove "Time_signature_engraver"
  \remove "Bar_engraver"
    }
  }
}
\score {
  <<
    { <c' ees' fes'>1 <cis' d' f'>1 }
  >>
  \layout {
    ragged-right = ##t
    \context {
      \Staff
      \remove "Time_signature_engraver"
      \remove "Bar_engraver"
    }
  }
}
}

Paul - this gives me the way to do it, thanks very much. Notice that in the first score the D and E in the second chord are in an invisible new bar, so lilypond would usually not put a natural on it to cancel the Db and Eb in the first bar. With the set-accidental-style command within the \new Staff block, it does add the cancelling naturals, which is what I wanted. I will have to insert the command for every new \score block, however, since as you can see the second staff didn't include a natural sign on the F (in the second invisible bar) to cancel the Fb in the first bar.

This version does what I want it do, but I still can't believe I need to be so verbose, with repeating everything for each score block:
Kieren is right. I have done that before. You get the same result by just choosing a time signature that takes in the whole line (without #(set-accidental-style 'no-reset) ), I tried your example with
\time 2/1 and it worked.

Paul





reply via email to

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