lilypond-user
[Top][All Lists]
Advanced

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

Re: Naturals & Accidental_engraver


From: Simon Mackenzie
Subject: Re: Naturals & Accidental_engraver
Date: Fri, 21 Aug 2009 15:13:40 +0700

Firstly: thank you for all your replies offering assistance.
Secondly: it seems I need to explain my situation more clearly.
It will be helpful not to think about the problem from the Lilypond side of things.
What I have is a music book which contains numerous pieces of music (it's a Thai hymn book) which is in need of correction and updating. My task is two fold, to replicate this music using Lilypond and then to use the same chords and voice but with lyrics in other languages, initially Lua' and later possibly Akha and Lahu.

I really don't yet understand how the Accidental_engraver works other than it has a bunch of ways by which it can determine from the music how to apply and show accidentals, automatically. In the Lilypond manuals there is also mention of special characters which can be added to notes to "force" accidentals to appear manually.  

Page 4 of the Lilypond manual
 Normally accidentals are printed automatically, but you may also print them manually. A
reminder accidental can be forced by adding an exclamation mark ! after the pitch. A cautionary
accidental (i.e., an accidental within parentheses) can be obtained by adding the question mark ?
after the pitch. These extra accidentals can also be used to produce natural signs.
cis cis cis! cis? c c c! c?

What I want to achieve is to replicate the hardcopy music shown below in Lilypond.


As you can see there are three naturals indicated, no others. How do I replicate this music in Lilypond when so far all it seems to have is a number of preset rules for defining how accidentals appear on any given music sheet. There does not appear to be a way of placing accidentals manually on a music sheet. 

The example cited above from page 4 of the Lilypond manual does not produce the results expected. The Accidental_engraver still needs to be on to "force" the additional Accidentals to appear as desired. I don't want to "force" additional accidentals! I want accidentals to only appear where I indicate they should appear irrespective of what rules may or may not currently apply with the current Accidental_engraver. See the above music sheet to understand what I mean. If Accidental engraving is turned on the equivalent music sheet in Lilypond has something like 10 times the number of accidentals appearing on the sheet and not the three I wish to have appear as seen in the hard copy of the music sheet above.

Simon

On 21/08/2009, at 11:52, James E. Bailey wrote:


On 21.08.2009, at 04:21, Simon Mackenzie wrote:

I'm lost on this one...

If I place the override in the voice context I end up with the following which is nothing like what I need to achieve.


Okay, I think I finally understand your question. You have \book block that has the accidental engraver stencil set to false, you want to turn it on for this one piece. You do that at the staff level. An example follows:
\version "2.12.2"
\\layout { \context { \Staff \override Accidental #'stencil = ##f } }

music = \relative c' { f4 e d c }

keys = { \key c \minor }

\score {
   \new Staff << \music \keys >>
   \layout {}
}

\score {
   \new Staff << \music \keys >>
   \layout { \context { \Staff \revert Accidental #'stencil } }
}

James E. Bailey





reply via email to

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