From: Valentin Villenave Date: Tue, 19 Aug 2008 08:35:07 +0000 (+0200) Subject: Adding a regtest for flexible contemporary accidentals X-Git-Tag: release/2.11.58-1~36 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=6097e05b8d7e935829984841a55753594bb16567;p=lilypond.git Adding a regtest for flexible contemporary accidentals This commits also updates the docs about Automatic accidentals. --- diff --git a/Documentation/user/pitches.itely b/Documentation/user/pitches.itely index 615191a0f8..7f39d91f10 100644 --- a/Documentation/user/pitches.itely +++ b/Documentation/user/pitches.itely @@ -1680,6 +1680,179 @@ musicB = { } @end lilypond + +@item neo-modern + +@funindex neo-modern +@cindex neo-modern accidental style +@cindex accidental style, neo-modern + +This rule reproduces a common practice in contemporary music: +accidentals are printed like with @code{modern}, but they are printed +again if the same note appears later in the same measure -- except +if the note is immediately repeated. + +@lilypond[quote] +musicA = { + << + \relative c' { + cis'8 fis, d'4 8 f bis4 | + cis2. 4 | + } + \\ + \relative c' { + ais'2 cis, | + fis8 b a4 cis2 | + } + >> +} + +musicB = { + \clef bass + \new Voice { + \voiceTwo \relative c' { + 4 + \change Staff = up + cis' + \change Staff = down + + \change Staff = up + dis' | + \change Staff = down + 4 gis 2 | + } + } +} + +\new PianoStaff { + << + \context Staff = "up" { + #(set-accidental-style 'neo-modern) + \musicA + } + \context Staff = "down" { + #(set-accidental-style 'neo-modern) + \musicB + } + >> +} +@end lilypond + +@item neo-modern-cautionary + +@funindex neo-modern-cautionary +@cindex neo-modern-cautionary accidental style +@cindex accidental style, neo-modern-cautionary + +This rule is similar to @code{neo-modern}, but the extra +accidentals are printed as cautionary accidentals. + +@lilypond[quote] +musicA = { + << + \relative c' { + cis'8 fis, d'4 8 f bis4 | + cis2. 4 | + } + \\ + \relative c' { + ais'2 cis, | + fis8 b a4 cis2 | + } + >> +} + +musicB = { + \clef bass + \new Voice { + \voiceTwo \relative c' { + 4 + \change Staff = up + cis' + \change Staff = down + + \change Staff = up + dis' | + \change Staff = down + 4 gis 2 | + } + } +} + +\new PianoStaff { + << + \context Staff = "up" { + #(set-accidental-style 'neo-modern-cautionary) + \musicA + } + \context Staff = "down" { + #(set-accidental-style 'neo-modern-cautionary) + \musicB + } + >> +} +@end lilypond + + +@item dodecaphonic + +@funindex dodecaphonic +@cindex dodecaphonic accidental style +@cindex dodecaphonic style, neo-modern + +This rule reflects a practice introduced by composers at +the beginning of the 20th century, in an attempt to +abolish the hierarchy between natural and non-natural notes. +With this style, @emph{every} note gets an accidental sign, +including natural signs. + +@lilypond[quote] +musicA = { + << + \relative c' { + cis'8 fis, d'4 8 f bis4 | + cis2. 4 | + } + \\ + \relative c' { + ais'2 cis, | + fis8 b a4 cis2 | + } + >> +} + +musicB = { + \clef bass + \new Voice { + \voiceTwo \relative c' { + 4 + \change Staff = up + cis' + \change Staff = down + + \change Staff = up + dis' | + \change Staff = down + 4 gis 2 | + } + } +} + +\new PianoStaff { + << + \context Staff = "up" { + #(set-accidental-style 'dodecaphonic) + \musicA + } + \context Staff = "down" { + #(set-accidental-style 'dodecaphonic) + \musicB + } + >> +} +@end lilypond + + @item no-reset @funindex no-reset @@ -1744,7 +1917,8 @@ musicB = { This is the opposite of @code{no-reset}: Accidentals are not remembered at all -- and hence all accidentals are typeset relative to the key signature, regardless of what came before in -the music: +the music. Unlike @code{dodecaphonic}, this rule never prints +any naturals. @lilypond[quote] musicA = { diff --git a/input/regression/accidental-contemporary.ly b/input/regression/accidental-contemporary.ly new file mode 100644 index 0000000000..145c96a987 --- /dev/null +++ b/input/regression/accidental-contemporary.ly @@ -0,0 +1,33 @@ +\version "2.11.57" +\header { + +texidoc = "Several automatic accidental rules +aim to reproduce contemporary music notation +practices: +@itemize +@item +'dodecaphonic style prints accidentals on every +note (including naturals) +@item +'neo-modern style prints accidentals on every note +(not including naturals), except when a note is +immediately repeated +@item +'neo-modern-cautionary style acts like neo-modern, +adding cautionary parentheses around accidentals. +@end itemize +" + +} + +\layout { ragged-right = ##t } + +\relative c'' { + #(set-accidental-style 'dodecaphonic) + gis4 a g gisis + #(set-accidental-style 'neo-modern) + gis8 a gis gis g' gis gis,, a' + #(set-accidental-style 'neo-modern-cautionary) + eis fis eis eis g2 +} +