]> git.donarmstrong.com Git - lilypond.git/blobdiff - Documentation/user/keyboards.itely
Update from Andrew.
[lilypond.git] / Documentation / user / keyboards.itely
index ad52b45e800f16ceee30aab81b347b0ff9699fe2..d9c12777e8de58c8c5ad2072024d1403ac144217 100644 (file)
 
 @node Keyboard instruments
 @section Keyboard instruments
-@c@node Piano music
-@c@section Piano music
+
+@lilypondfile[quote]{keyboard-headword.ly}
+
+This section discusses several aspects of music notation that are unique
+to keyboard instruments.
 
 @menu
-* Piano sections::              
+* Common notation for keyboards::
+* Piano::
+* Accordion::
 @end menu
 
-@node Piano sections
-@subsection Piano sections
+@node Common notation for keyboards
+@subsection Common notation for keyboards
 
-Piano staves are two normal staves coupled with a brace.  The staves
-are largely independent, but sometimes voices can cross between the
-two staves.  The same notation is also used for harps and other key
-instruments.  The @internalsref{PianoStaff} is especially built to
-handle this cross-staffing behavior.  In this section we discuss the
-@internalsref{PianoStaff} and some other pianistic peculiarities.
+This section discusses notation issues that may arise for most keyboard
+instruments.
 
 @menu
-* Automatic staff changes::     
-* Manual staff switches::       
-* Pedals::                      
-* Staff switch lines::          
-* Cross staff stems::           
+* References for keyboards::
+* Changing staff manually::
+* Changing staff automatically::
+* Staff-change lines::
+* Cross-staff stems::
 @end menu
 
-@knownissues
+@node References for keyboards
+@subsubsection References for keyboards
 
-Dynamics are not centered, but workarounds do exist.  See the
-@q{piano centered dynamics} template in @rlearning{Piano templates}.
+Keyboard instruments are usually notated with Piano staves.  These
+are two or more normal staves coupled with a brace.  The same
+notation is also used for harps and other keyed instruments.
+Organ music is normally written with two staves inside a
+@code{PianoStaff} group and third, normal staff for the pedals.
 
-@cindex cross staff stem
-@cindex stem, cross staff
-@cindex distance between staves in piano music
+The staves in keyboard music are largely independent, but
+sometimes voices can cross between the two staves.  In this
+section we discuss some notation techniques particular to keyboard
+music.
 
+Several common issues in keyboard music are covered elsewhere:
 
-@node Automatic staff changes
-@subsubsection Automatic staff changes
-@cindex Automatic staff changes
+@itemize
+@item Keyboard music usually contains multiple voices and the
+number of voices may change regularly; this is described in
+@ref{Collision resolution}.
 
-Voices can be made to switch automatically between the top and the bottom
-staff.  The syntax for this is
+@item Keyboard music can be written in parallel, as described in
+@ref{Writing music in parallel}.
 
-@quotation
-@example
-\autochange @dots{}@var{music}@dots{}
-@end example
-@end quotation
+@item Fingerings are indicated with @ref{Fingering instructions}.
 
-@noindent
-This will create two staves inside the current PianoStaff, called
-@code{up} and @code{down}.  The lower staff will be in bass clef by
-default.
+@item Organ pedal indications are inserted as articulations, see
+@ref{List of articulations}.
 
-A @code{\relative} section that is outside of @code{\autochange} has
-no effect on the pitches of @var{music}, so, if necessary, put
-@code{\relative} inside @code{\autochange} like
+@item Vertical grid lines can be shown with @ref{Grid lines}.
 
-@quotation
-@example
-\autochange \relative @dots{} @dots{}
-@end example
-@end quotation
+@item Keyboard music often contains @notation{Laissez vibrer} ties
+as well as ties on arpeggios and tremelos, described in
+@ref{Ties}.
 
+@item Placing arpeggios across multiple voices and staves is
+covered in @ref{Arpeggio}.
 
-The autochanger switches on basis of the pitch (middle C is the turning
-point), and it looks ahead skipping over rests to switch in
-advance.  Here is a practical example
+@item Tremolo marks are described in @ref{Tremolo repeats}.
 
-@lilypond[quote,verbatim,ragged-right]
-\new PianoStaff
-  \autochange \relative c'
-  {
-    g4 a b c d r4 a g
-  }
-@end lilypond
+@item Several of the tweaks that can occur in keyboard music are
+demonstrated in @rlearning{Real music example}.
+
+@item Hidden notes can be used to produce ties that cross voices,
+as shown in @rlearning{Other uses for tweaks}.
 
+@end itemize
 
 @seealso
 
-Notation Reference: @ref{Manual staff switches}.
+Learning Manual:
+@rlearning{Real music example},
+@rlearning{Other uses for tweaks}.
 
-Internals Reference: @internalsref{AutoChangeMusic}.
+Notation Reference:
+@ref{Grouping staves},
+@ref{Instrument names},
+@ref{Writing music in parallel},
+@ref{Fingering instructions},
+@ref{Grid lines},
+@ref{Ties},
+@ref{Arpeggio},
+@ref{Tremolo repeats},
+@ref{List of articulations}.
 
+Internals Reference:
+@rinternals{PianoStaff}.
 
+Snippets:
+@rlsr{Keyboards}.
 
 @knownissues
 
-The staff switches may not end up in optimal places.  For high
-quality output, staff switches should be specified manually.
-
-
-@code{\autochange} cannot be inside @code{\times}.
+Dynamics are not automatically centered, but workarounds do exist.  One
+option is the @q{piano centered dynamics} template under
+@rlearning{Piano templates}; another option is to increase the
+@code{staff-padding} of dynamics as discussed in @rlearning{Moving
+objects}.
 
+@node Changing staff manually
+@subsubsection Changing staff manually
 
-@node Manual staff switches
-@subsubsection Manual staff switches
-
-@cindex manual staff switches
-@cindex staff switch, manual
+@cindex changing staff manually
+@cindex manual staff changes
+@cindex staff changes, manual
+@cindex cross-staff notes
+@cindex notes, cross-staff
+@cindex cross-staff beams
+@cindex beams, cross-staff
+@funindex \change
 
 Voices can be switched between staves manually, using the command
+
 @example
-\change Staff = @var{staffname} @var{music}
+\change Staff = @var{staffname}
 @end example
 
 @noindent
-The string @var{staffname} is the name of the staff.  It switches the
-current voice from its current staff to the Staff called
-@var{staffname}.  Typically @var{staffname} is @code{"up"} or
-@code{"down"}.  The @code{Staff} referred to must already exist, so
-usually the setup for a score will start with a setup of the staves,
+The string @var{staffname} is the name of the staff.  It switches
+the current voice from its current staff to the Staff called
+@var{staffname}.  Typical values for @var{staffname} are
+@code{"up"} and @code{"down"}, or @code{"RH"} and @code{"LH"}.
 
-@example
-<<
-  \new Staff = "up" @{
-    \skip 1 * 10  % @emph{keep staff alive}
-    @}
-  \new Staff = "down" @{
-    \skip 1 * 10  % @emph{idem}
-    @}
+Cross-staff notes are beamed automatically:
+
+@lilypond[verbatim,quote,ragged-right]
+\new PianoStaff <<
+  \new Staff = "up" {
+    <e' c'>8
+    \change Staff = down
+    g fis g
+    \change Staff = up
+    <g'' c''>8
+    \change Staff = down
+    e dis e
+    \change Staff = up
+  }
+  \new Staff = "down" {
+    \clef bass
+    s1 % keep staff alive
+  }
 >>
-@end example
+@end lilypond
 
+If the beaming needs to be tweaked, make any changes to the stem
+directions first.  The beam positions are then measured from the
+center of the staff that is closest to the beam.  For a simple
+example of beam tweaking, see @rlearning{Fixing overlapping
+notation}.
 
-and the @code{Voice} is inserted afterwards
+@seealso
 
-@example
-\context Staff = down
-  \new Voice @{ @dots{} \change Staff = up @dots{} @}
-@end example
+Learning Manual:
+@rlearning{Fixing overlapping notation}.
 
+Notation Reference:
+@ruser{Stems},
+@ruser{Automatic beams}.
 
-@node Pedals
-@subsubsection Pedals
-@cindex Pedals
+Snippets:
+@rlsr{Keyboards}.
 
-Pianos have pedals that alter the way sound is produced.  Generally, a
-piano has three pedals, sustain, una corda, and sostenuto.
+Internals Reference:
+@rinternals{Beam}.
 
 
-Piano pedal instruction can be expressed by attaching
-@code{\sustainDown}, @code{\sustainUp}, @code{\unaCorda},
-@code{\treCorde}, @code{\sostenutoDown} and @code{\sostenutoUp} to a
-note or chord
+@node Changing staff automatically
+@subsubsection Changing staff automatically
 
-@lilypond[quote,ragged-right,fragment,verbatim]
-c'4\sustainDown c'4\sustainUp
-@end lilypond
+@cindex changing staff automatically
+@cindex automatic staff changes
+@cindex staff changes, automatic
+@funindex \autochange
 
-What is printed can be modified by setting @code{pedal@var{X}Strings},
-where @var{X} is one of the pedal types: @code{Sustain},
-@code{Sostenuto} or @code{UnaCorda}.  Refer to
-@internalsref{SustainPedal} in the program reference for more
-information.
+Voices can be made to switch automatically between the top and the
+bottom staff.  The syntax for this is
 
-Pedals can also be indicated by a sequence of brackets, by setting the
-@code{pedalSustainStyle} property to bracket objects
+@example
+\autochange @dots{}@var{music}@dots{}
+@end example
 
-@lilypond[quote,ragged-right,fragment,verbatim,relative=2]
-\set Staff.pedalSustainStyle = #'bracket
-c\sustainDown d e
-b\sustainUp\sustainDown
-b g \sustainUp a \sustainDown \bar "|."
+@noindent
+This will create two staves inside the current staff group
+(usually a @code{PianoStaff}), called @code{"up"} and
+@code{"down"}.  The lower staff will be in bass clef by default.
+The autochanger switches on basis of the pitch (middle C is the
+turning point), and it looks ahead skipping over rests to switch
+in advance.
+
+@lilypond[quote,verbatim,ragged-right]
+\new PianoStaff {
+  \autochange {
+    g4 a b c' d' r4 a g
+  }
+}
 @end lilypond
 
-A third style of pedal notation is a mixture of text and brackets,
-obtained by setting the @code{pedalSustainStyle} property to
-@code{mixed}
+A @code{\relative} section that is outside of @code{\autochange}
+has no effect on the pitches of the music, so if necessary, put
+@code{\relative} inside @code{\autochange}.
 
-@lilypond[quote,ragged-right,fragment,verbatim,relative=2]
-\set Staff.pedalSustainStyle = #'mixed
-c\sustainDown d e
-b\sustainUp\sustainDown
-b g \sustainUp a \sustainDown \bar "|."
+If additional control is needed over the individual staves, they
+can be created manually with the names @code{"up"} and
+@code{"down"}.  The @code{\autochange} command will then switch
+its voice between the existing staves.  For example, this is
+necessary to place a key signature in the lower staff:
+
+@lilypond[quote,verbatim,ragged-right]
+\new PianoStaff <<
+  \new Staff = "up" {
+    \new Voice = "melOne" {
+      \key g \major
+      \autochange \relative c' {
+        g8 b a c b d c e
+        d r fis, g a2
+      }
+    }
+  }
+  \new Staff = "down" {
+    \key g \major
+    \clef bass
+  }
+>>
 @end lilypond
 
-The default @q{*Ped.} style for sustain and damper pedals corresponds to
-style @code{#'text}.  The sostenuto pedal uses @code{mixed} style by
-default.
+@seealso
 
-@lilypond[quote,ragged-right,fragment,verbatim,relative=2]
-c\sostenutoDown d e c, f g a\sostenutoUp
-@end lilypond
+Notation Reference:
+@ref{Changing staff manually}.
 
-For fine-tuning the appearance of a pedal bracket, the properties
-@code{edge-width}, @code{edge-height}, and @code{shorten-pair} of
-@code{PianoPedalBracket} objects (see
-@internalsref{PianoPedalBracket} in the Internals Reference) can be
-modified.  For example, the bracket may be extended to the right edge
-of the note head
+Snippets:
+@rlsr{Keyboards}.
 
-@lilypond[quote,ragged-right,fragment,verbatim,relative=2]
-\override Staff.PianoPedalBracket #'shorten-pair = #'(0 . -1.0)
-c\sostenutoDown d e c, f g a\sostenutoUp
-@end lilypond
+Internals Reference:
+@rinternals{AutoChangeMusic}.
 
-@seealso
+@knownissues
 
-Notation Reference: @ref{Ties} (laissez vibrer).
+The staff switches may not end up in optimal places.  For high
+quality output, staff switches should be specified manually.
 
-@node Staff switch lines
-@subsubsection Staff switch lines
+Chords will not be split across the staves; they will be assigned to a
+staff based on the first note named in the chord construct.
 
+@node Staff-change lines
+@subsubsection Staff-change lines
 
+@cindex staff-change lines
+@cindex cross-staff lines
+@cindex lines, staff-change follower
 @cindex follow voice
 @cindex staff switching
-@cindex cross staff
-
+@cindex cross-staff
 @funindex followVoice
 
-Whenever a voice switches to another staff, a line connecting the notes
-can be printed automatically.  This is switched on by setting
-@code{followVoice} to true
+Whenever a voice switches to another staff, a line connecting the
+notes can be printed automatically:
 
 @lilypond[quote,ragged-right,fragment,relative=1,verbatim]
 \new PianoStaff <<
-  \new Staff="one" {
-    \set followVoice = ##t
+  \new Staff = "one" {
+    \showStaffSwitch
     c1
     \change Staff=two
     b2 a
   }
-  \new Staff="two" { \clef bass \skip 1*2 }
+  \new Staff = "two" { \clef bass s1*2 }
 >>
 @end lilypond
 
-@seealso
-
-Internals Reference: @internalsref{VoiceFollower}.
-
 @predefined
 
 @funindex \showStaffSwitch
-@code{\showStaffSwitch},
 @funindex \hideStaffSwitch
-@code{\hideStaffSwitch}.
+@code{\showStaffSwitch}, @code{\hideStaffSwitch}.
+
+@seealso
 
+Snippets:
+@rlsr{Keyboards}.
 
-@node Cross staff stems
-@subsubsection Cross staff stems
+Internals Reference:
+@rinternals{VoiceFollower}.
+
+
+@node Cross-staff stems
+@subsubsection Cross-staff stems
+
+@cindex cross-staff notes
+@cindex notes, cross-staff
+@cindex cross-staff stems
+@cindex stems, cross-staff
 
 Chords that cross staves may be produced by increasing the length
 of the stem in the lower staff, so it reaches the stem in the upper
 staff, or vice versa.
 
 @lilypond[ragged-right,verbatim,quote]
-stemExtend = {
-  \once \override Stem #'length = #10
-  \once \override Stem #'cross-staff = ##t
-}
-noFlag = \once \override Stem #'flag-style = #'no-flag
 \new PianoStaff <<
-  \new Staff {
-    \stemDown \stemExtend
-    f'4
-    \stemExtend \noFlag
-    f'8
+  \new Staff \relative c' {
+    f8 e4 d8 <f bes,>2
   }
-  \new Staff {
-    \clef bass
-    a4 a8
+  \new Staff \relative c' {
+    << {
+      \clef bass
+      \stemUp
+      \override Stem #'length = #12
+      \override Stem #'cross-staff = ##t
+      \override Stem #'flag-style = #'no-flag
+      a8 g4 f8
+    } \\
+    { f,2 d' }
+    >>
   }
 >>
 @end lilypond
 
+@snippets
+@lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
+{indicating-cross-staff-chords-with-arpeggio-bracket.ly}
+
+@seealso
+
+Snippets:
+@rlsr{Keyboards}.
+
+Internals Reference:
+@rinternals{Stem}
+
+@node Piano
+@subsection Piano
+
+This section discusses notation issues that relate most directly to the
+piano.
+
+@menu
+* Piano pedals::
+@end menu
+
+@node Piano pedals
+@subsubsection Piano pedals
+@cindex piano pedals
+@cindex pedals, piano
+@cindex sustain pedal
+@cindex sostenuto pedal
+@cindex una corde
+@cindex tre corde
+@funindex \sustainDown
+@funindex \sustainUp
+@funindex \sostenutoDown
+@funindex \sostenutoUp
+@funindex \unaCorda
+@funindex \treCorde
+
+Pianos generally have three pedals that alter the way sound is
+produced: @notation{sustain}, @notation{sostenuto}
+(@notation{sos.}), and @notation{una corde} (@notation{U.C.}).
+Sustain pedals are also found on vibraphones and celestas.
+
+@lilypond[quote,ragged-right,fragment,verbatim,relative=2]
+c4\sustainDown d e g
+<c, f a>1\sustainUp
+c4\sostenutoDown e g c,
+<bes d f>1\sostenutoUp
+c4\unaCorda d e g
+<d fis a>1\treCorde
+@end lilypond
+
+There are three styles of pedal indications: text, bracket, and mixed.
+The sustain pedal and the una corda pedal use the text style by default
+while the sostenuto pedal uses mixed by default.
+
+@lilypond[quote,ragged-right,fragment,verbatim,relative=2]
+c4\sustainDown g c2\sustainUp
+\set Staff.pedalSustainStyle = #'mixed
+c4\sustainDown g c d
+d\sustainUp\sustainDown g, c2\sustainUp
+\set Staff.pedalSustainStyle = #'bracket
+c4\sustainDown g c d
+d\sustainUp\sustainDown g, c2
+\bar "|."
+@end lilypond
+
+The placement of the pedal commands matches the physical movement of the
+sustain pedal during piano performance.  Pedalling to the final bar line
+is indicated by omitting the final pedal up command.
+
+@seealso
+
+Notation Reference:
+@ref{Ties}.
+
+Snippets:
+@rlsr{Keyboards}.
+
+Internals Reference:
+@rinternals{SustainPedal},
+@rinternals{SustainPedalLineSpanner},
+@rinternals{SostenutoPedal},
+@rinternals{SostenutoPedalLineSpanner},
+@rinternals{UnaCordaPedal},
+@rinternals{UnaCordaPedalLineSpanner},
+@rinternals{PianoPedalBracket},
+@rinternals{Piano_pedal_engraver}.
 
+@node Accordion
+@subsection Accordion
 
+This section discusses notation that is unique to the accordion.
+
+@menu
+* Discant symbols::
+@end menu
+
+@node Discant symbols
+@subsubsection Discant symbols
+@cindex accordion discant symbols
+@cindex discant symbols, accordion
+@cindex accordion shifts
+
+Accordions are often built with more than one set of reeds that may be
+in unison with, an octave above, or an octave below the written pitch.
+Each accordion maker has different names for the @notation{shifts} that
+select the various reed combinations, such as @notation{oboe},
+@notation{musette}, or @notation{bandonium}, so a system of symbols has
+come into use to simplify the performance instructions.
+
+@snippets
+
+@c This snippet should work once it's been tagged for the docs.
+@c @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
+@c {accordion-discant-symbols.ly}
+
+@seealso
 
+Snippets:
+@rlsr{Keyboards}.