]> git.donarmstrong.com Git - lilypond.git/blobdiff - Documentation/user/changing-defaults.itely
Another Accidental update.
[lilypond.git] / Documentation / user / changing-defaults.itely
index c15103ad6d1a7820b6aee802705776568bc4bc01..b537246607550bb24fc0a5f65ffd9950808677a6 100644 (file)
@@ -255,6 +255,27 @@ playing one voice and musicians playing all voices.  Accidentals are
 typeset for each voice, but they @emph{are} canceled across voices in
 the same @internalsref{Staff}.
 
+@lilypond[quote,ragged-right]
+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 |  } }}
+
+\score { 
+       \new PianoStaff {
+       << \context Staff = "up" {
+              #(set-accidental-style 'modern-voice) 
+       \musicA }
+       \context Staff = "down"{
+              #(set-accidental-style 'modern-voice)
+       \musicB } >> }
+       \header { piece = \markup {\fill-line { \fontsize #3  "'modern-voice" }}}
+}
+@end lilypond
+
 @funindex modern-voice-cautionary
 @item modern-voice-cautionary
 This rule is the same as @code{modern-voice}, but with the extra
@@ -263,18 +284,97 @@ as cautionaries.  Even though all accidentals typeset by
 @code{default} @emph{are} typeset by this variable,
 some of them are typeset as cautionaries.
 
+@lilypond[quote,ragged-right]
+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 |  } }}
+
+\score { 
+       \new PianoStaff {
+       << \context Staff = "up" {
+              #(set-accidental-style 'modern-voice-cautionary) 
+       \musicA }
+       \context Staff = "down"{
+              #(set-accidental-style 'modern-voice-cautionary)
+       \musicB } >> }
+       \header { piece = \markup {\fill-line { \fontsize #3  "'modern-voice-cautionary" }}}
+}
+@end lilypond
+
 @item piano
 @funindex piano accidentals
-This rule reflects 20th century practice for piano notation.  Very similar to
-@code{modern} but accidentals also get canceled
+This accidental style takes place in a GrandStaff context. However, you have to 
+explicitly set it for @emph{each} individual Staff of the GrandStaff:
+
+@example
+\new GrandStaff @{ <<
+  \new Staff = "up" @{ <<
+    #(set-accidental-style 'piano)
+    @{ @dots{} @}
+  >> @}
+  \new Staff = "down"@{ <<
+    #(set-accidental-style 'piano)
+  @{ @dots{} @}
+  >> @}
+>> @}
+@end example
+
+This rule reflects 20th century practice for piano notation.  Its behavior is very
+similar to @code{modern} style, but here accidentals also get canceled
 across the staves in the same @internalsref{GrandStaff} or
 @internalsref{PianoStaff}.
 
+@lilypond[quote,ragged-right]
+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 |  } }}
+
+\score { 
+       \new PianoStaff {
+       << \context Staff = "up" {
+              #(set-accidental-style 'piano) 
+       \musicA }
+       \context Staff = "down"{
+              #(set-accidental-style 'piano)
+       \musicB } >> }
+       \header { piece = \markup {\fill-line { \fontsize #3  "'piano" }}}
+}
+@end lilypond
+
 @item piano-cautionary
 @funindex #(set-accidental-style 'piano-cautionary)
 Same as @code{#(set-accidental-style 'piano)} but with the extra
 accidentals typeset as cautionaries.
 
+@lilypond[quote,ragged-right]
+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 |  } }}
+
+\score { 
+       \new PianoStaff {
+       << \context Staff = "up" {
+              #(set-accidental-style 'piano-cautionary) 
+       \musicA }
+       \context Staff = "down"{
+              #(set-accidental-style 'piano-cautionary)
+       \musicB } >> }
+       \header { piece = \markup {\fill-line { \fontsize #3  "'piano-cautionary" }}}
+}
+@end lilypond
+
 @item no-reset
 @funindex no-reset accidental style
 This is the same as @code{default} but with accidentals lasting