This section describes how to change the way that accidentals are inserted automatically before the running notes.
Common rules for typesetting accidentals have been canned in a function. This function is called as follows
#(set-accidental-style 'modern 'Voice)
The function takes two arguments: a symbol that denotes the style (in
the example, modern
), and another symbol that denotes the
context name (in this example, Voice
). If no context name is
supplied, Staff
is the default.
The following styles are supported
default
voice
code
.
This leads to some weird and often unwanted results because accidentals from one voice do not get canceled in other voices
\context Staff << #(set-accidental-style 'voice) << { es g } \\ { c, e } >> >>
Hence you should only use voice
if the voices
are to be read solely by individual musicians. If the staff is to be
used by one musician (e.g. a conductor) then you use
modern
or modern-cautionary
instead.
modern
default
, but temporary
accidentals also are canceled in other octaves. Furthermore,
in the same octave, they also get canceled in the following
measure
#(set-accidental-style 'modern) cis' c'' cis'2 | c'' c'
modern-cautionary
modern
, but the
“extra” accidentals (the ones not typeset by
default
) are typeset as cautionary accidentals.
They are printed in reduced size or with parentheses
#(set-accidental-style 'modern-cautionary) cis' c'' cis'2 | c'' c'
modern-voice
modern-voice-cautionary
modern-voice
, but with the extra
accidentals (the ones not typeset by voice
) typeset
as cautionaries. Even though all accidentals typeset by
default
are typeset by this variable then
some of them are typeset as cautionaries.
piano
modern
but accidentals also get canceled
across the staves in the same GrandStaff or
PianoStaff.
piano-cautionary
#(set-accidental-style 'piano)' , str)
but with the extra accidentals
typeset as cautionaries.
no-reset
default
but with accidentals lasting
“forever” and not only until the next measure
#(set-accidental-style 'no-reset) c1 cis cis c
forget
no-reset
: Accidentals
are not remembered at all—and hence all accidentals are
typeset relative to the key signature, regardless of what was
before in the music
#(set-accidental-style 'forget) \key d\major c4 c cis cis d d dis dis
Program reference: Accidental_engraver, Accidental, and AccidentalPlacement.
Simultaneous notes are considered to be entered in sequential mode. This means that in a chord the accidentals are typeset as if the notes in the chord happened once at a time - in the order in which they appear in the input file.
This is only a problem when accidentals in a chord depend on each
other. This problem can be solved by manually inserting !
and
?
for the problematic notes.
In the default scheme, accidentals only depend on other accidentals with the same pitch on the same staff, so no conflicts are possible.
Read comments on this page, or
add one.
This page is for LilyPond-2.2.6 (stable-branch). |