]> git.donarmstrong.com Git - lilypond.git/blobdiff - Documentation/notation/pitches.itely
Rerun scripts/auxiliar/update-with-convert-ly.sh
[lilypond.git] / Documentation / notation / pitches.itely
index 4bc237094ac9061cb3d0a60978cda36b86bdc02f..bdfc34a7dfc442a1d2b88c4fa1477f985750eb92 100644 (file)
@@ -7,7 +7,7 @@
     Guide, node Updating translation committishes..
 @end ignore
 
-@c \version "2.15.20"
+@c \version "2.17.6"
 
 
 @node Pitches
@@ -820,15 +820,16 @@ rather than e-triple-flat).
 @cindex operation, inversion
 @funindex \inversion
 
-A music expression can be inverted with:
+A music expression can be inverted and transposed in a single
+operation with:
 
 @example
-\inversion @var{from-pitch} @var{to-pitch} @var{musicexpr}
+\inversion @var{around-pitch} @var{to-pitch} @var{musicexpr}
 @end example
 
-The @code{@var{musicexpr}} is inverted interval-by-interval,
-and then transposed so that @code{@var{from-pitch}} is mapped
-to @code{@var{to-pitch}}.
+The @code{@var{musicexpr}} is inverted interval-by-interval around
+@code{@var{around-pitch}}, and then transposed so that
+@code{@var{around-pitch}} is mapped to @code{@var{to-pitch}}.
 
 @lilypond[verbatim,quote]
 music = \relative c' { c d e f }
@@ -839,6 +840,10 @@ music = \relative c' { c d e f }
 }
 @end lilypond
 
+@warning{Motifs to be inverted should be expressed in absolute form
+or be first converted to absolute form by enclosing them in a 
+@code{\relative} block.}
+
 @seealso
 Notation Reference:
 @ref{Modal transformations},
@@ -895,7 +900,7 @@ It may also be reversed to produce its @notation{retrograde}, see
 @warning{Any note that does not lie within the given scale will be
 left untransformed.}
 
-@subsubheading Modal transposition
+@subsubsubheading Modal transposition
 
 @cindex modal transposition
 @cindex transposition, modal
@@ -952,7 +957,7 @@ motif = \relative c' { c8 d e f g a b c }
 }
 @end lilypond
 
-@subsubheading Modal inversion
+@subsubsubheading Modal inversion
 
 @cindex modal inversion
 @cindex inversion, modal
@@ -1174,6 +1179,21 @@ Internals Reference:
 @rinternals{OctavateEight},
 @rinternals{clef-interface}.
 
+@knownissues
+Ottavation numbers attached to clefs are treated as separate grobs.  So
+any @code{\override} done to the @var{Clef} will also need to be
+applied, as a separate @code{\override}, to the @var{OctavateEight}
+grob.
+
+@lilypond[fragment,quote,relative=1]
+\new Staff \with {
+  \override OctavateEight.color = #red
+  \override Clef.color = #blue
+}
+
+\clef "treble_8" c4
+@end lilypond
+
 
 @node Key signature
 @unnumberedsubsubsec Key signature
@@ -1245,6 +1265,37 @@ f
 fis
 @end lilypond
 
+Additional modes can be defined, by listing the alterations
+for each scale step when the mode starts on C.
+
+@lilypond[verbatim,quote]
+freygish = #`((0 . ,NATURAL) (1 . ,FLAT) (2 . ,NATURAL)
+    (3 . ,NATURAL) (4 . ,NATURAL) (5 . ,FLAT) (6 . ,FLAT))
+
+\relative c' {
+  \key c\freygish c4 des e f
+  \bar "||" \key d\freygish d es fis g
+}
+@end lilypond
+
+Accidentals in the key signature may be printed in octaves other
+than their traditional positions, or in multiple octaves, by
+using the @code{flat-positions} and @code{sharp-positions}
+properties of @code{KeySignature}.  Entries in these properties
+specify the range of staff-positions where accidentals will be
+printed.  If a single position is specified in an entry, the
+accidentals are placed within the octave ending at that staff
+position.
+
+@lilypond[verbatim, quote,relative=0]
+\override Staff.KeySignature.flat-positions = #'((-5 . 5))
+\override Staff.KeyCancellation.flat-positions = #'((-5 . 5))
+\clef bass \key es\major es g bes d
+\clef treble \bar "||" \key es\major es g bes d
+
+\override Staff.KeySignature.sharp-positions = #'(2)
+\bar "||" \key b\major b fis b2
+@end lilypond
 
 @snippets
 
@@ -1271,7 +1322,6 @@ Internals Reference:
 @rinternals{Key_performer},
 @rinternals{KeyCancellation},
 @rinternals{KeySignature},
-@rinternals{key-cancellation-interface},
 @rinternals{key-signature-interface}.
 
 
@@ -1397,7 +1447,7 @@ clarinet.
 \transposition a
 c d e f
 \textLengthOn
-s1*0^\markup { Switch to B\flat clarinet }
+<>^\markup { Switch to B\flat clarinet }
 R1
 
 \key bes \major
@@ -1438,7 +1488,7 @@ accidental style to use.  This function is called as follows:
 
 @example
 \new Staff <<
-  \accidentalStyle "voice"
+  \accidentalStyle voice
   @{ @dots{} @}
 >>
 @end example
@@ -1451,7 +1501,7 @@ scope the style should be changed.  For example, to use the same
 style in all staves of the current @code{StaffGroup}, use:
 
 @example
-\accidentalStyle #'StaffGroup "voice"
+\accidentalStyle StaffGroup.voice
 @end example
 
 The following accidental styles are supported.  To demonstrate
@@ -1477,11 +1527,11 @@ musicB = {
   \clef bass
   \new Voice {
     \voiceTwo \relative c' {
-      <fis, a cis>8 <fis a cis>
+      <fis, a cis>8[ <fis a cis>
       \change Staff = up
       cis' cis
       \change Staff = down
-      <fis, a> <fis a>
+      <fis, a> <fis a>]
       \showStaffSwitch
       \change Staff = up
       dis'4 |
@@ -1494,11 +1544,11 @@ musicB = {
 \new PianoStaff {
   <<
     \context Staff = "up" {
-      \accidentalStyle "default"
+      \accidentalStyle default
       \musicA
     }
     \context Staff = "down" {
-      \accidentalStyle "default"
+      \accidentalStyle default
       \musicB
     }
   >>
@@ -1514,7 +1564,7 @@ both staves.
   <<
     \context Staff = "up" @{
       %%% change the next line as desired:
-      \accidentalStyle #'Score "default"
+      \accidentalStyle Score.default
       \musicA
     @}
     \context Staff = "down" @{
@@ -1560,11 +1610,11 @@ musicB = {
   \clef bass
   \new Voice {
     \voiceTwo \relative c' {
-      <fis, a cis>8 <fis a cis>
+      <fis, a cis>8[ <fis a cis>
       \change Staff = up
       cis' cis
       \change Staff = down
-      <fis, a> <fis a>
+      <fis, a> <fis a>]
       \showStaffSwitch
       \change Staff = up
       dis'4 |
@@ -1577,11 +1627,11 @@ musicB = {
 \new PianoStaff {
   <<
     \context Staff = "up" {
-      \accidentalStyle "default"
+      \accidentalStyle default
       \musicA
     }
     \context Staff = "down" {
-      \accidentalStyle "default"
+      \accidentalStyle default
       \musicB
     }
   >>
@@ -1633,11 +1683,11 @@ musicB = {
   \clef bass
   \new Voice {
     \voiceTwo \relative c' {
-      <fis, a cis>8 <fis a cis>
+      <fis, a cis>8[ <fis a cis>
       \change Staff = up
       cis' cis
       \change Staff = down
-      <fis, a> <fis a>
+      <fis, a> <fis a>]
       \showStaffSwitch
       \change Staff = up
       dis'4 |
@@ -1650,11 +1700,11 @@ musicB = {
 \new PianoStaff {
   <<
     \context Staff = "up" {
-      \accidentalStyle "voice"
+      \accidentalStyle voice
       \musicA
     }
     \context Staff = "down" {
-      \accidentalStyle "voice"
+      \accidentalStyle voice
       \musicB
     }
   >>
@@ -1699,11 +1749,11 @@ musicB = {
   \clef bass
   \new Voice {
     \voiceTwo \relative c' {
-      <fis, a cis>8 <fis a cis>
+      <fis, a cis>8[ <fis a cis>
       \change Staff = up
       cis' cis
       \change Staff = down
-      <fis, a> <fis a>
+      <fis, a> <fis a>]
       \showStaffSwitch
       \change Staff = up
       dis'4 |
@@ -1716,11 +1766,11 @@ musicB = {
 \new PianoStaff {
   <<
     \context Staff = "up" {
-      \accidentalStyle "modern"
+      \accidentalStyle modern
       \musicA
     }
     \context Staff = "down" {
-      \accidentalStyle "modern"
+      \accidentalStyle modern
       \musicB
     }
   >>
@@ -1763,11 +1813,11 @@ musicB = {
   \clef bass
   \new Voice {
     \voiceTwo \relative c' {
-      <fis, a cis>8 <fis a cis>
+      <fis, a cis>8[ <fis a cis>
       \change Staff = up
       cis' cis
       \change Staff = down
-      <fis, a> <fis a>
+      <fis, a> <fis a>]
       \showStaffSwitch
       \change Staff = up
       dis'4 |
@@ -1780,11 +1830,11 @@ musicB = {
 \new PianoStaff {
   <<
     \context Staff = "up" {
-      \accidentalStyle "modern-cautionary"
+      \accidentalStyle modern-cautionary
       \musicA
     }
     \context Staff = "down" {
-      \accidentalStyle "modern-cautionary"
+      \accidentalStyle modern-cautionary
       \musicB
     }
   >>
@@ -1830,11 +1880,11 @@ musicB = {
   \clef bass
   \new Voice {
     \voiceTwo \relative c' {
-      <fis, a cis>8 <fis a cis>
+      <fis, a cis>8[ <fis a cis>
       \change Staff = up
       cis' cis
       \change Staff = down
-      <fis, a> <fis a>
+      <fis, a> <fis a>]
       \showStaffSwitch
       \change Staff = up
       dis'4 |
@@ -1847,11 +1897,11 @@ musicB = {
 \new PianoStaff {
   <<
     \context Staff = "up" {
-      \accidentalStyle "modern-voice"
+      \accidentalStyle modern-voice
       \musicA
     }
     \context Staff = "down" {
-      \accidentalStyle "modern-voice"
+      \accidentalStyle modern-voice
       \musicB
     }
   >>
@@ -1891,11 +1941,11 @@ musicB = {
   \clef bass
   \new Voice {
     \voiceTwo \relative c' {
-      <fis, a cis>8 <fis a cis>
+      <fis, a cis>8[ <fis a cis>
       \change Staff = up
       cis' cis
       \change Staff = down
-      <fis, a> <fis a>
+      <fis, a> <fis a>]
       \showStaffSwitch
       \change Staff = up
       dis'4 |
@@ -1908,11 +1958,11 @@ musicB = {
 \new PianoStaff {
   <<
     \context Staff = "up" {
-      \accidentalStyle "modern-voice-cautionary"
+      \accidentalStyle modern-voice-cautionary
       \musicA
     }
     \context Staff = "down" {
-      \accidentalStyle "modern-voice-cautionary"
+      \accidentalStyle modern-voice-cautionary
       \musicB
     }
   >>
@@ -1956,11 +2006,11 @@ musicB = {
   \clef bass
   \new Voice {
     \voiceTwo \relative c' {
-      <fis, a cis>8 <fis a cis>
+      <fis, a cis>8[ <fis a cis>
       \change Staff = up
       cis' cis
       \change Staff = down
-      <fis, a> <fis a>
+      <fis, a> <fis a>]
       \showStaffSwitch
       \change Staff = up
       dis'4 |
@@ -1973,7 +2023,7 @@ musicB = {
 \new PianoStaff {
   <<
     \context Staff = "up" {
-      \accidentalStyle "piano"
+      \accidentalStyle piano
       \musicA
     }
     \context Staff = "down" {
@@ -2016,11 +2066,11 @@ musicB = {
   \clef bass
   \new Voice {
     \voiceTwo \relative c' {
-      <fis, a cis>8 <fis a cis>
+      <fis, a cis>8[ <fis a cis>
       \change Staff = up
       cis' cis
       \change Staff = down
-      <fis, a> <fis a>
+      <fis, a> <fis a>]
       \showStaffSwitch
       \change Staff = up
       dis'4 |
@@ -2033,7 +2083,7 @@ musicB = {
 \new PianoStaff {
   <<
     \context Staff = "up" {
-      \accidentalStyle "piano-cautionary"
+      \accidentalStyle piano-cautionary
       \musicA
     }
     \context Staff = "down" {
@@ -2075,11 +2125,11 @@ musicB = {
   \clef bass
   \new Voice {
     \voiceTwo \relative c' {
-      <fis, a cis>8 <fis a cis>
+      <fis, a cis>8[ <fis a cis>
       \change Staff = up
       cis' cis
       \change Staff = down
-      <fis, a> <fis a>
+      <fis, a> <fis a>]
       \showStaffSwitch
       \change Staff = up
       dis'4 |
@@ -2092,11 +2142,11 @@ musicB = {
 \new PianoStaff {
   <<
     \context Staff = "up" {
-      \accidentalStyle "neo-modern"
+      \accidentalStyle neo-modern
       \musicA
     }
     \context Staff = "down" {
-      \accidentalStyle "neo-modern"
+      \accidentalStyle neo-modern
       \musicB
     }
   >>
@@ -2132,11 +2182,11 @@ musicB = {
   \clef bass
   \new Voice {
     \voiceTwo \relative c' {
-      <fis, a cis>8 <fis a cis>
+      <fis, a cis>8[ <fis a cis>
       \change Staff = up
       cis' cis
       \change Staff = down
-      <fis, a> <fis a>
+      <fis, a> <fis a>]
       \showStaffSwitch
       \change Staff = up
       dis'4 |
@@ -2149,11 +2199,11 @@ musicB = {
 \new PianoStaff {
   <<
     \context Staff = "up" {
-      \accidentalStyle "neo-modern-cautionary"
+      \accidentalStyle neo-modern-cautionary
       \musicA
     }
     \context Staff = "down" {
-      \accidentalStyle "neo-modern-cautionary"
+      \accidentalStyle neo-modern-cautionary
       \musicB
     }
   >>
@@ -2192,11 +2242,11 @@ musicB = {
   \clef bass
   \new Voice {
     \voiceTwo \relative c' {
-      <fis, a cis>8 <fis a cis>
+      <fis, a cis>8[ <fis a cis>
       \change Staff = up
       cis' cis
       \change Staff = down
-      <fis, a> <fis a>
+      <fis, a> <fis a>]
       \showStaffSwitch
       \change Staff = up
       dis'4 |
@@ -2209,11 +2259,11 @@ musicB = {
 \new PianoStaff {
   <<
     \context Staff = "up" {
-      \accidentalStyle "neo-modern-voice"
+      \accidentalStyle neo-modern-voice
       \musicA
     }
     \context Staff = "down" {
-      \accidentalStyle "neo-modern-voice"
+      \accidentalStyle neo-modern-voice
       \musicB
     }
   >>
@@ -2249,11 +2299,11 @@ musicB = {
   \clef bass
   \new Voice {
     \voiceTwo \relative c' {
-      <fis, a cis>8 <fis a cis>
+      <fis, a cis>8[ <fis a cis>
       \change Staff = up
       cis' cis
       \change Staff = down
-      <fis, a> <fis a>
+      <fis, a> <fis a>]
       \showStaffSwitch
       \change Staff = up
       dis'4 |
@@ -2266,11 +2316,11 @@ musicB = {
 \new PianoStaff {
   <<
     \context Staff = "up" {
-      \accidentalStyle "neo-modern-voice-cautionary"
+      \accidentalStyle neo-modern-voice-cautionary
       \musicA
     }
     \context Staff = "down" {
-      \accidentalStyle "neo-modern-voice-cautionary"
+      \accidentalStyle neo-modern-voice-cautionary
       \musicB
     }
   >>
@@ -2309,11 +2359,11 @@ musicB = {
   \clef bass
   \new Voice {
     \voiceTwo \relative c' {
-      <fis, a cis>8 <fis a cis>
+      <fis, a cis>8[ <fis a cis>
       \change Staff = up
       cis' cis
       \change Staff = down
-      <fis, a> <fis a>
+      <fis, a> <fis a>]
       \showStaffSwitch
       \change Staff = up
       dis'4 |
@@ -2326,11 +2376,11 @@ musicB = {
 \new PianoStaff {
   <<
     \context Staff = "up" {
-      \accidentalStyle "dodecaphonic"
+      \accidentalStyle dodecaphonic
       \musicA
     }
     \context Staff = "down" {
-      \accidentalStyle "dodecaphonic"
+      \accidentalStyle dodecaphonic
       \musicB
     }
   >>
@@ -2351,7 +2401,7 @@ Accidentals are printed like with @code{modern}, but cautionary
 accidentals are added for all sharp or flat tones specified by the
 key signature, except if the note is immediately repeated.
 
-@lilypond[quote]
+@lilypond[quote,staffsize=18]
 musicA = {
   <<
     \relative c' {
@@ -2370,11 +2420,11 @@ musicB = {
   \clef bass
   \new Voice {
     \voiceTwo \relative c' {
-      <fis, a cis>8 <fis a cis>
+      <fis, a cis>8[ <fis a cis>
       \change Staff = up
       cis' cis
       \change Staff = down
-      <fis, a> <fis a>
+      <fis, a> <fis a>]
       \showStaffSwitch
       \change Staff = up
       dis'4 |
@@ -2388,12 +2438,12 @@ musicB = {
   <<
     \context Staff = "up" {
       \key fis \minor
-      \accidentalStyle "teaching"
+      \accidentalStyle teaching
       \musicA
     }
     \context Staff = "down" {
       \key fis \minor
-      \accidentalStyle "teaching"
+      \accidentalStyle teaching
       \musicB
     }
   >>
@@ -2431,11 +2481,11 @@ musicB = {
   \clef bass
   \new Voice {
     \voiceTwo \relative c' {
-      <fis, a cis>8 <fis a cis>
+      <fis, a cis>8[ <fis a cis>
       \change Staff = up
       cis' cis
       \change Staff = down
-      <fis, a> <fis a>
+      <fis, a> <fis a>]
       \showStaffSwitch
       \change Staff = up
       dis'4 |
@@ -2448,11 +2498,11 @@ musicB = {
 \new PianoStaff {
   <<
     \context Staff = "up" {
-      \accidentalStyle "no-reset"
+      \accidentalStyle no-reset
       \musicA
     }
     \context Staff = "down" {
-      \accidentalStyle "no-reset"
+      \accidentalStyle no-reset
       \musicB
     }
   >>
@@ -2490,11 +2540,11 @@ musicB = {
   \clef bass
   \new Voice {
     \voiceTwo \relative c' {
-      <fis, a cis>8 <fis a cis>
+      <fis, a cis>8[ <fis a cis>
       \change Staff = up
       cis' cis
       \change Staff = down
-      <fis, a> <fis a>
+      <fis, a> <fis a>]
       \showStaffSwitch
       \change Staff = up
       dis'4 |
@@ -2507,11 +2557,11 @@ musicB = {
 \new PianoStaff {
   <<
     \context Staff = "up" {
-      \accidentalStyle "forget"
+      \accidentalStyle forget
       \musicA
     }
     \context Staff = "down" {
-      \accidentalStyle "forget"
+      \accidentalStyle forget
       \musicB
     }
   >>
@@ -2554,7 +2604,7 @@ not need a natural sign:
 
 @lilypond[quote]
 {
-  \accidentalStyle "modern"
+  \accidentalStyle modern
   \time 2/4
   \repeat volta 2 {
     c'2
@@ -2571,12 +2621,12 @@ the accidental style to @code{forget}:
 
 @lilypond[verbatim,quote]
 forget = #(define-music-function (parser location music) (ly:music?) #{
-  \accidentalStyle "forget"
-  $music
-  \accidentalStyle "modern"
+  \accidentalStyle forget
+  #music
+  \accidentalStyle modern
 #})
 {
-  \accidentalStyle "modern"
+  \accidentalStyle modern
   \time 2/4
   \repeat volta 2 {
     c'2
@@ -2691,13 +2741,13 @@ The appearance of note heads may be altered:
 
 @lilypond[verbatim,quote,relative=2]
 c4 b
-\override NoteHead #'style = #'cross
+\override NoteHead.style = #'cross
 c4 b
-\revert NoteHead #'style
+\revert NoteHead.style
 a b
-\override NoteHead #'style = #'harmonic
+\override NoteHead.style = #'harmonic
 a b
-\revert NoteHead #'style
+\revert NoteHead.style
 c4 d e f
 @end lilypond