but you may wish to apply the accidental style to a single @code{Voice}
instead.
-The following accidental styles are supported:
+The following accidental styles are supported. To demonstrate
+each style, we use the following example:
+@c TODO: a Formatter, please clean this up.
+@lilypond[quote,ragged-right,verbatim]
+musicA = { << \relative { cis'8 fis, d'4 <a cis>8 f bis4 | cis2. <c, g'>4 | } \\
+ \relative { ais'2 cis, | fis8 b a4 cis2 | } >> }
+
+musicB = { \clef bass \new Voice { \voiceTwo \relative { < fis, a cis>4
+ \change Staff = up cis' \change Staff = down <fis, a>
+ \change Staff = up dis' | \change Staff = down <fis, a cis>4 gis
+ <f a d>2 | } }}
+
+\new PianoStaff {
+ << \context Staff = "up" {
+ %%% change the next line as desired:
+ %#(set-accidental-style 'default)
+ \musicA }
+ \context Staff = "down"{
+ %%% change the next line as desired:
+ %#(set-accidental-style 'default)
+ \musicB } >> }
+@end lilypond
+
+@c don't use verbatim in this table.
@table @code
@item default
-This is the default typesetting behavior. It corresponds
-to 18th century common practice: Accidentals are
-remembered to the end of the measure in which they occur and
-only on their own octave.
+This is the default typesetting behavior. It corresponds to
+eighteenth-century common practice: Accidentals are remembered to
+the end of the measure in which they occur and only on their own
+octave. Thus, in the example below, no natural signs are printed
+before the @code{b} in the second measure or the last @code{c}:
@lilypond[quote,ragged-right]
-musicA = { << \relative { cis'8 fis, d'4 <a cis>8 f bis4 | cis2. <c, g'>4 | } \\
+musicA = { << \relative { cis'8 fis, d'4 <a cis>8 f bis4 | cis2. <c, g'>4 | } \\
\relative { ais'2 cis, | fis8 b a4 cis2 | } >> }
musicB = { \clef bass \new Voice { \voiceTwo \relative { < fis, a cis>4
\change Staff = up dis' | \change Staff = down <fis, a cis>4 gis
<f a d>2 | } }}
-\score {
- \new PianoStaff {
+\new PianoStaff {
<< \context Staff = "up" {
%#(set-accidental-style 'default)
\musicA }
\context Staff = "down"{
%#(set-accidental-style 'default)
\musicB } >> }
- \header { piece = \markup {\fill-line { \fontsize #3 "'default" }}}
-}
@end lilypond
@item voice
\change Staff = up dis' | \change Staff = down <fis, a cis>4 gis
<f a d>2 | } }}
-\score {
\new PianoStaff {
<< \context Staff = "up" {
#(set-accidental-style 'voice)
\context Staff = "down"{
#(set-accidental-style 'voice)
\musicB } >> }
- \header { piece = \markup {\fill-line { \fontsize #3 "'voice" }}}
-}
@end lilypond
The @code{voice} option should be used if the voices
\change Staff = up dis' | \change Staff = down <fis, a cis>4 gis
<f a d>2 | } }}
-\score {
\new PianoStaff {
<< \context Staff = "up" {
#(set-accidental-style 'modern)
\context Staff = "down"{
#(set-accidental-style 'modern)
\musicB } >> }
- \header { piece = \markup {\fill-line { \fontsize #3 "'modern" }}}
-}
@end lilypond
@item @code{modern-cautionary}
\change Staff = up dis' | \change Staff = down <fis, a cis>4 gis
<f a d>2 | } }}
-\score {
\new PianoStaff {
<< \context Staff = "up" {
#(set-accidental-style 'modern-cautionary)
\context Staff = "down"{
#(set-accidental-style 'modern-cautionary)
\musicB } >> }
- \header { piece = \markup {\fill-line { \fontsize #3 "'modern-cautionary" }}}
-}
@end lilypond
@funindex modern-voice
\change Staff = up dis' | \change Staff = down <fis, a cis>4 gis
<f a d>2 | } }}
-\score {
\new PianoStaff {
<< \context Staff = "up" {
#(set-accidental-style 'modern-voice)
\context Staff = "down"{
#(set-accidental-style 'modern-voice)
\musicB } >> }
- \header { piece = \markup {\fill-line { \fontsize #3 "'modern-voice" }}}
-}
@end lilypond
@funindex modern-voice-cautionary
\change Staff = up dis' | \change Staff = down <fis, a cis>4 gis
<f a d>2 | } }}
-\score {
\new PianoStaff {
<< \context Staff = "up" {
#(set-accidental-style 'modern-voice-cautionary)
\context Staff = "down"{
#(set-accidental-style 'modern-voice-cautionary)
\musicB } >> }
- \header { piece = \markup {\fill-line { \fontsize #3 "'modern-voice-cautionary" }}}
-}
@end lilypond
@item piano
\change Staff = up dis' | \change Staff = down <fis, a cis>4 gis
<f a d>2 | } }}
-\score {
\new PianoStaff {
<< \context Staff = "up" {
#(set-accidental-style 'piano)
\context Staff = "down"{
#(set-accidental-style 'piano)
\musicB } >> }
- \header { piece = \markup {\fill-line { \fontsize #3 "'piano" }}}
-}
@end lilypond
@item piano-cautionary
\change Staff = up dis' | \change Staff = down <fis, a cis>4 gis
<f a d>2 | } }}
-\score {
\new PianoStaff {
<< \context Staff = "up" {
#(set-accidental-style 'piano-cautionary)
\context Staff = "down"{
#(set-accidental-style 'piano-cautionary)
\musicB } >> }
- \header { piece = \markup {\fill-line { \fontsize #3 "'piano-cautionary" }}}
-}
@end lilypond
@item no-reset
\change Staff = up dis' | \change Staff = down <fis, a cis>4 gis
<f a d>2 | } }}
-\score {
\new PianoStaff {
<< \context Staff = "up" {
#(set-accidental-style 'no-reset)
\context Staff = "down"{
#(set-accidental-style 'no-reset)
\musicB } >> }
- \header { piece = \markup {\fill-line { \fontsize #3 "'no-reset" }}}
-}
@end lilypond
@item forget
\change Staff = up dis' | \change Staff = down <fis, a cis>4 gis
<f a d>2 | } }}
-\score {
\new PianoStaff {
<< \context Staff = "up" {
#(set-accidental-style 'forget)
\context Staff = "down"{
#(set-accidental-style 'forget)
\musicB } >> }
- \header { piece = \markup {\fill-line { \fontsize #3 "'forget" }}}
-}
@end lilypond
@end table