]> git.donarmstrong.com Git - lilypond.git/blobdiff - Documentation/notation/pitches.itely
known issue in NR: extra cautionnary accidentals in \alternative block
[lilypond.git] / Documentation / notation / pitches.itely
index f6e853d14b99862a0dc9089e2244e4e63ffbe74a..3cf931333b15a05065449dfb88f4aca5eb162666 100644 (file)
@@ -37,6 +37,7 @@ mode.  In most cases, relative mode will be more convenient.
 * Relative octave entry::
 * Accidentals::
 * Note names in other languages::
+* Non-Western note names and accidentals::
 @end menu
 
 
@@ -388,9 +389,6 @@ cis
 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
 {preventing-extra-naturals-from-being-automatically-added.ly}
 
-@lilypondfile[verbatim,lilyquote,texidoc,doctitle]
-{makam-example.ly}
-
 
 @seealso
 Music Glossary:
@@ -573,6 +571,70 @@ Snippets:
 @rlsr{Pitches}.
 
 
+@node Non-Western note names and accidentals
+@unnumberedsubsubsec Non-Western note names and accidentals
+
+Many non-Western musics (and some Western folk and
+traditional musics) employ alternative or extended tuning
+systems that do not fit readily into standard classical
+notation.
+
+In some cases standard notation is still used, with the
+pitch differences being implicit.  For example, Arabic
+music is notated with standard semitone and quarter-tone
+accidentals, with the precise pitch alterations being
+determined by context.  Others require extended or unique
+notations.
+
+@notation{Turkish classical music}, or Ottoman music,
+employs melodic forms known as @notation{makamlar}, whose
+intervals are based on 1/9 divisions of the whole tone.
+From a modern notational point of view, it is convenient
+to use the standard Western staff notes (c, d, e, ...)
+with special accidentals unique to Turkish music.  These
+accidentals are defined in @file{makam.ly} (to locate this
+file on your system, see
+@rlearning{Other sources of information}).  The following
+table gives their names, the accidental suffix that must
+be added to notes, and their pitch alteration as a
+fraction of one whole tone.
+
+@c TODO: can we include the actual accidentals in this table?
+@quotation
+@multitable {@b{büyük mücenneb (sharp)}} {@b{suffix}} {@b{pitch alteration}}
+@headitem Accidental name
+  @tab suffix @tab pitch alteration
+
+@item büyük mücenneb (sharp)
+  @tab -bm @tab +8/9
+@item kücük mücenneb (sharp)
+  @tab -k @tab +5/9
+@item bakiye (sharp)
+  @tab -b @tab +4/9
+@item koma (sharp)
+  @tab -c @tab +1/9
+
+@item koma (flat)
+  @tab -fc @tab -1/9
+@item bakiye (flat)
+  @tab -fb @tab -4/9
+@item kücük mücenneb (flat)
+  @tab -fk @tab -5/9
+@item büyük mücenneb (flat)
+  @tab -fbm @tab -8/9
+@end multitable
+@end quotation
+
+For further information on Turkish classical music and
+makamlar, see @ref{Turkish classical music}.
+
+
+@snippets
+
+@lilypondfile[verbatim,lilyquote,texidoc,doctitle]
+{makam-example.ly}
+
+
 @node Changing multiple pitches
 @subsection Changing multiple pitches
 
@@ -930,7 +992,8 @@ c2 c
 
 @seealso
 Notation Reference:
-@ref{Mensural clefs}, @ref{Gregorian clefs}.
+@ref{Mensural clefs},
+@ref{Gregorian clefs}.
 
 Snippets:
 @rlsr{Pitches}.
@@ -1179,7 +1242,8 @@ Music Glossary:
 @rglos{transposing instrument}.
 
 Notation Reference:
-@ref{Quoting other voices}, @ref{Transpose}.
+@ref{Quoting other voices},
+@ref{Transpose}.
 
 Snippets:
 @rlsr{Pitches}.
@@ -1244,13 +1308,14 @@ musicB = {
   \clef bass
   \new Voice {
     \voiceTwo \relative c' {
-      <fis, a cis>4
+      <fis, a cis>8 <fis a cis>
       \change Staff = up
-      cis'
+      cis' cis
       \change Staff = down
-      <fis, a>
+      <fis, a> <fis a>
+      \showStaffSwitch
       \change Staff = up
-      dis' |
+      dis'4 |
       \change Staff = down
       <fis, a cis>4 gis <f a d>2 |
     }
@@ -1326,13 +1391,14 @@ musicB = {
   \clef bass
   \new Voice {
     \voiceTwo \relative c' {
-      <fis, a cis>4
+      <fis, a cis>8 <fis a cis>
       \change Staff = up
-      cis'
+      cis' cis
       \change Staff = down
-      <fis, a>
+      <fis, a> <fis a>
+      \showStaffSwitch
       \change Staff = up
-      dis' |
+      dis'4 |
       \change Staff = down
       <fis, a cis>4 gis <f a d>2 |
     }
@@ -1398,13 +1464,14 @@ musicB = {
   \clef bass
   \new Voice {
     \voiceTwo \relative c' {
-      <fis, a cis>4
+      <fis, a cis>8 <fis a cis>
       \change Staff = up
-      cis'
+      cis' cis
       \change Staff = down
-      <fis, a>
+      <fis, a> <fis a>
+      \showStaffSwitch
       \change Staff = up
-      dis' |
+      dis'4 |
       \change Staff = down
       <fis, a cis>4 gis <f a d>2 |
     }
@@ -1460,13 +1527,14 @@ musicB = {
   \clef bass
   \new Voice {
     \voiceTwo \relative c' {
-      <fis, a cis>4
+      <fis, a cis>8 <fis a cis>
       \change Staff = up
-      cis'
+      cis' cis
       \change Staff = down
-      <fis, a>
+      <fis, a> <fis a>
+      \showStaffSwitch
       \change Staff = up
-      dis' |
+      dis'4 |
       \change Staff = down
       <fis, a cis>4 gis <f a d>2 |
     }
@@ -1523,13 +1591,14 @@ musicB = {
   \clef bass
   \new Voice {
     \voiceTwo \relative c' {
-      <fis, a cis>4
+      <fis, a cis>8 <fis a cis>
       \change Staff = up
-      cis'
+      cis' cis
       \change Staff = down
-      <fis, a>
+      <fis, a> <fis a>
+      \showStaffSwitch
       \change Staff = up
-      dis' |
+      dis'4 |
       \change Staff = down
       <fis, a cis>4 gis <f a d>2 |
     }
@@ -1589,13 +1658,14 @@ musicB = {
   \clef bass
   \new Voice {
     \voiceTwo \relative c' {
-      <fis, a cis>4
+      <fis, a cis>8 <fis a cis>
       \change Staff = up
-      cis'
+      cis' cis
       \change Staff = down
-      <fis, a>
+      <fis, a> <fis a>
+      \showStaffSwitch
       \change Staff = up
-      dis' |
+      dis'4 |
       \change Staff = down
       <fis, a cis>4 gis <f a d>2 |
     }
@@ -1649,13 +1719,14 @@ musicB = {
   \clef bass
   \new Voice {
     \voiceTwo \relative c' {
-      <fis, a cis>4
+      <fis, a cis>8 <fis a cis>
       \change Staff = up
-      cis'
+      cis' cis
       \change Staff = down
-      <fis, a>
+      <fis, a> <fis a>
+      \showStaffSwitch
       \change Staff = up
-      dis' |
+      dis'4 |
       \change Staff = down
       <fis, a cis>4 gis <f a d>2 |
     }
@@ -1713,13 +1784,14 @@ musicB = {
   \clef bass
   \new Voice {
     \voiceTwo \relative c' {
-      <fis, a cis>4
+      <fis, a cis>8 <fis a cis>
       \change Staff = up
-      cis'
+      cis' cis
       \change Staff = down
-      <fis, a>
+      <fis, a> <fis a>
+      \showStaffSwitch
       \change Staff = up
-      dis' |
+      dis'4 |
       \change Staff = down
       <fis, a cis>4 gis <f a d>2 |
     }
@@ -1772,13 +1844,14 @@ musicB = {
   \clef bass
   \new Voice {
     \voiceTwo \relative c' {
-      <fis, a cis>4
+      <fis, a cis>8 <fis a cis>
       \change Staff = up
-      cis'
+      cis' cis
       \change Staff = down
-      <fis, a>
+      <fis, a> <fis a>
+      \showStaffSwitch
       \change Staff = up
-      dis' |
+      dis'4 |
       \change Staff = down
       <fis, a cis>4 gis <f a d>2 |
     }
@@ -1830,13 +1903,14 @@ musicB = {
   \clef bass
   \new Voice {
     \voiceTwo \relative c' {
-      <fis, a cis>4
+      <fis, a cis>8 <fis a cis>
       \change Staff = up
-      cis'
+      cis' cis
       \change Staff = down
-      <fis, a>
+      <fis, a> <fis a>
+      \showStaffSwitch
       \change Staff = up
-      dis' |
+      dis'4 |
       \change Staff = down
       <fis, a cis>4 gis <f a d>2 |
     }
@@ -1886,13 +1960,14 @@ musicB = {
   \clef bass
   \new Voice {
     \voiceTwo \relative c' {
-      <fis, a cis>4
+      <fis, a cis>8 <fis a cis>
       \change Staff = up
-      cis'
+      cis' cis
       \change Staff = down
-      <fis, a>
+      <fis, a> <fis a>
+      \showStaffSwitch
       \change Staff = up
-      dis' |
+      dis'4 |
       \change Staff = down
       <fis, a cis>4 gis <f a d>2 |
     }
@@ -1914,6 +1989,122 @@ musicB = {
 @end lilypond
 
 
+@item neo-modern-voice
+
+@cindex neo-modern-voice accidental style
+@cindex accidental style, neo-modern-voice
+
+@funindex neo-modern-voice
+
+This rule is used for multivoice accidentals to be read both by
+musicians playing one voice and musicians playing all voices.
+Accidentals are typeset for each voice as with @code{neo-modern},
+but they are canceled across voices in the same @code{Staff}.
+
+@lilypond[quote]
+musicA = {
+  <<
+    \relative c' {
+      cis'8 fis, d'4 <a cis>8 f bis4 |
+      cis2. <c, g'>4 |
+    }
+    \\
+    \relative c' {
+      ais'2 cis, |
+      fis8 b a4 cis2 |
+    }
+  >>
+}
+
+musicB = {
+  \clef bass
+  \new Voice {
+    \voiceTwo \relative c' {
+      <fis, a cis>8 <fis a cis>
+      \change Staff = up
+      cis' cis
+      \change Staff = down
+      <fis, a> <fis a>
+      \showStaffSwitch
+      \change Staff = up
+      dis'4 |
+      \change Staff = down
+      <fis, a cis>4 gis <f a d>2 |
+    }
+  }
+}
+
+\new PianoStaff {
+  <<
+    \context Staff = "up" {
+      #(set-accidental-style 'neo-modern-voice)
+      \musicA
+    }
+    \context Staff = "down" {
+      #(set-accidental-style 'neo-modern-voice)
+      \musicB
+    }
+  >>
+}
+@end lilypond
+
+@item neo-modern-voice-cautionary
+
+@cindex neo-modern-voice-cautionary accidental style
+@cindex accidental style, neo-modern-voice-cautionary
+
+@funindex neo-modern-voice-cautionary
+
+This rule is similar to @code{neo-modern-voice}, but the extra
+accidentals are printed as cautionary accidentals.
+
+@lilypond[quote]
+musicA = {
+  <<
+    \relative c' {
+      cis'8 fis, d'4 <a cis>8 f bis4 |
+      cis2. <c, g'>4 |
+    }
+    \\
+    \relative c' {
+      ais'2 cis, |
+      fis8 b a4 cis2 |
+    }
+  >>
+}
+
+musicB = {
+  \clef bass
+  \new Voice {
+    \voiceTwo \relative c' {
+      <fis, a cis>8 <fis a cis>
+      \change Staff = up
+      cis' cis
+      \change Staff = down
+      <fis, a> <fis a>
+      \showStaffSwitch
+      \change Staff = up
+      dis'4 |
+      \change Staff = down
+      <fis, a cis>4 gis <f a d>2 |
+    }
+  }
+}
+
+\new PianoStaff {
+  <<
+    \context Staff = "up" {
+      #(set-accidental-style 'neo-modern-voice-cautionary)
+      \musicA
+    }
+    \context Staff = "down" {
+      #(set-accidental-style 'neo-modern-voice-cautionary)
+      \musicB
+    }
+  >>
+}
+@end lilypond
+
 @item dodecaphonic
 
 @cindex dodecaphonic accidental style
@@ -1946,13 +2137,14 @@ musicB = {
   \clef bass
   \new Voice {
     \voiceTwo \relative c' {
-      <fis, a cis>4
+      <fis, a cis>8 <fis a cis>
       \change Staff = up
-      cis'
+      cis' cis
       \change Staff = down
-      <fis, a>
+      <fis, a> <fis a>
+      \showStaffSwitch
       \change Staff = up
-      dis' |
+      dis'4 |
       \change Staff = down
       <fis, a cis>4 gis <f a d>2 |
     }
@@ -2006,13 +2198,14 @@ musicB = {
   \clef bass
   \new Voice {
     \voiceTwo \relative c' {
-      <fis, a cis>4
+      <fis, a cis>8 <fis a cis>
       \change Staff = up
-      cis'
+      cis' cis
       \change Staff = down
-      <fis, a>
+      <fis, a> <fis a>
+      \showStaffSwitch
       \change Staff = up
-      dis' |
+      dis'4 |
       \change Staff = down
       <fis, a cis>4 gis <f a d>2 |
     }
@@ -2066,13 +2259,14 @@ musicB = {
   \clef bass
   \new Voice {
     \voiceTwo \relative c' {
-      <fis, a cis>4
+      <fis, a cis>8 <fis a cis>
       \change Staff = up
-      cis'
+      cis' cis
       \change Staff = down
-      <fis, a>
+      <fis, a> <fis a>
+      \showStaffSwitch
       \change Staff = up
-      dis' |
+      dis'4 |
       \change Staff = down
       <fis, a cis>4 gis <f a d>2 |
     }
@@ -2125,13 +2319,14 @@ musicB = {
   \clef bass
   \new Voice {
     \voiceTwo \relative c' {
-      <fis, a cis>4
+      <fis, a cis>8 <fis a cis>
       \change Staff = up
-      cis'
+      cis' cis
       \change Staff = down
-      <fis, a>
+      <fis, a> <fis a>
+      \showStaffSwitch
       \change Staff = up
-      dis' |
+      dis'4 |
       \change Staff = down
       <fis, a cis>4 gis <f a d>2 |
     }
@@ -2166,7 +2361,7 @@ Snippets:
 Internals Reference:
 @rinternals{Accidental},
 @rinternals{Accidental_engraver},
-@rinternals{GrandStaff} and
+@rinternals{GrandStaff},
 @rinternals{PianoStaff},
 @rinternals{Staff},
 @rinternals{AccidentalSuggestion},
@@ -2191,6 +2386,51 @@ manually inserting@tie{}@code{!} and@tie{}@code{?} for the
 problematic notes.
 
 
+Cautionary cancellation of accidentals is done by looking at previous measure.
+However, in the @code{\alternative} block following a @code{\repeat volta N}
+section, one would expect the cancellation being calculated using the previous
+@emph{played} measure, not previous @emph{printed} measure.
+In the following example, the natural @code{c} in the second alternative does
+not need a natural sign:
+
+@lilypond[quote]
+{
+  #(set-accidental-style 'modern)
+  \time 2/4
+  \repeat volta 2 {
+    c'2
+  }
+  \alternative {
+     cis'
+     c'
+  }
+  \bar "|."
+}
+@end lilypond
+
+The following work-around can be used: define a function that locally changes
+the accidental style to @code{forget}:
+
+@lilypond[verbatim,quote]
+forget = #(define-music-function (parser location music) (ly:music?) #{
+  #(set-accidental-style 'forget)
+  $music
+  #(set-accidental-style 'modern)
+#})
+{
+  #(set-accidental-style 'modern)
+  \time 2/4
+  \repeat volta 2 {
+    c'2
+  }
+  \alternative {
+     cis'
+     \forget c'
+  }
+  \bar "|."
+}
+@end lilypond
+
 @node Ambitus
 @unnumberedsubsubsec Ambitus
 
@@ -2289,25 +2529,58 @@ This section suggests ways of altering note heads.
 
 @funindex cross
 
-Note heads may be altered:
+The appearance of note heads may be altered:
 
 @lilypond[verbatim,quote,relative=2]
-c4 b a b
+c4 b
 \override NoteHead #'style = #'cross
-c4 b a b
+c4 b
+\revert NoteHead #'style
+a b
+\override NoteHead #'style = #'harmonic
+a b
 \revert NoteHead #'style
 c4 d e f
 @end lilypond
 
-There is a shorthand for diamond shapes which can only be used
-inside chords:
+To see all note head styles, see @ref{Note head styles}.
+
+The @code{cross} style is used to represent a variety of musical
+intentions.  The following generic predefined commands modify the
+note head in both staff and tablature contexts and can be used to
+represent any musical meaning:
 
 @lilypond[verbatim,quote,relative=2]
-<c f\harmonic>2 <d a'\harmonic>4 <c g'\harmonic>
+c4 b
+\xNotesOn
+ a b c4 b
+\xNotesOff
+c4 d
 @end lilypond
 
-To see all note head styles, see @ref{Note head styles}.
+The music function form of this predefined command may be used
+inside and outside chords to generate crossed note heads in both
+staff and tablature contexts:
 
+@lilypond[verbatim,quote,relative=2]
+c4 b
+\xNote { e f }
+c b < g \xNote c f > b
+@end lilypond
+
+There is also a shorthand for diamond shapes which can be used
+only inside chords:
+
+@lilypond[verbatim,quote,relative=2]
+<c f\harmonic>2 <d a'\harmonic>4 <c g'\harmonic>
+@end lilypond
+
+@predefined
+@code{\harmonic},
+@code{\xNotesOn},
+@code{\xNotesOff},
+@code{\xNote}.
+@endpredefined
 
 @seealso
 Snippets: