X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=Documentation%2Fuser%2Fexamples.itely;h=b1226f529968af86c16cacaa7327566c7ec0ad6d;hb=ee831d1368f453ce399a4dece1653831898b013b;hp=2190029fc7f1d5f64676e0ed2479751c51022be8;hpb=302b6147551ed3a53e526798e2913f876bf95eed;p=lilypond.git diff --git a/Documentation/user/examples.itely b/Documentation/user/examples.itely index 2190029fc7..b1226f5299 100644 --- a/Documentation/user/examples.itely +++ b/Documentation/user/examples.itely @@ -411,13 +411,18 @@ pedal = { \override VerticalAlignment #'forced-distance = #7 } } +} +\score { + \context PianoStaff << + \context Staff=upper << \upper \dynamics >> + \context Staff=lower << \lower \dynamics >> + \context Dynamics=pedal \pedal + >> \midi { \context { \type "Performer_group_performer" \name Dynamics \consists "Piano_pedal_performer" - \consists "Span_dynamic_performer" - \consists "Dynamic_performer" } \context { \PianoStaff @@ -436,39 +441,39 @@ This template demonstrates a string quartet. It also uses a @code{\global} section for time and key signatures. @lilypond[quote,verbatim,raggedright] -version "2.4.0" +\version "2.4.0" global= { \time 4/4 \key c \major } -Violinone = \new Voice { \relative c''{ +violinOne = \new Voice { \relative c''{ \set Staff.instrument = "Violin 1 " c2 d e1 \bar "|." }} -Violintwo = \new Voice { \relative c''{ +violinTwo = \new Voice { \relative c''{ \set Staff.instrument = "Violin 2 " g2 f e1 \bar "|." }} -Viola = \new Voice { \relative c' { +viola = \new Voice { \relative c' { \set Staff.instrument = "Viola " \clef alto e2 d c1 \bar "|." }} -Cello = \new Voice { \relative c' { +cello = \new Voice { \relative c' { \set Staff.instrument = "Cello " \clef bass c2 b a1 -\bar "|."}} %********************************** +\bar "|."}} \score { \new StaffGroup << @@ -482,7 +487,6 @@ Cello = \new Voice { \relative c' { } @end lilypond - @subsection String quartet parts The previous example produces a nice string quartet, but what if you @@ -671,6 +675,102 @@ bassWords = \lyricmode { @end lilypond +@subsection SATB vocal score and automatic piano reduction + +This template adds an automatic piano reduction to the SATB vocal +score. This demonstrates one of the strengths of LilyPond -- you +can use a music definition more than once. If you make any changes +to the vocal notes (say, tenorMusic), then the changes will also +apply to the piano reduction. + +@lilypond[quote,verbatim,raggedright] +\version "2.4.0" +global = { + \key c \major + \time 4/4 +} + +sopMusic = \relative c'' { + c4 c c8[( b)] c4 +} +sopWords = \lyricmode { + hi hi hi hi +} + +altoMusic = \relative c' { + e4 f d e +} +altoWords =\lyricmode { + ha ha ha ha +} + +tenorMusic = \relative c' { + g4 a f g +} +tenorWords = \lyricmode { + hu hu hu hu +} +bassMusic = \relative c { + c4 c g c +} +bassWords = \lyricmode { + ho ho ho ho +} + +\layout { + \context { + % a little smaller so lyrics + % can be closer to the staff + \Staff + minimumVerticalExtent = #'(-3 . 3) + } +} + +<< + \context ChoirStaff + << + \context Lyrics = sopranos { s1 } + \context Staff = women << + \context Voice = + sopranos { \voiceOne << \global \sopMusic >> } + \context Voice = + altos { \voiceTwo << \global \altoMusic >> } + >> + \context Lyrics = altos { s1 } + \context Lyrics = tenors { s1 } + \context Staff = men << + \clef bass + \context Voice = + tenors { \voiceOne <<\global \tenorMusic >> } + \context Voice = + basses { \voiceTwo <<\global \bassMusic >> } + >> + \context Lyrics = basses { s1 } + \context Lyrics = sopranos \lyricsto sopranos \sopWords + \context Lyrics = altos \lyricsto altos \altoWords + \context Lyrics = tenors \lyricsto tenors \tenorWords + \context Lyrics = basses \lyricsto basses \bassWords + >> + \new PianoStaff + << + \new Staff << + \set Staff.printPartCombineTexts = ##f + \partcombine + << \global \sopMusic >> + << \global \altoMusic >> + >> + \new Staff << + \clef bass + \set Staff.printPartCombineTexts = ##f + \partcombine + << \global \tenorMusic >> + << \global \bassMusic >> + >> + >> +>> +@end lilypond + + @c bad node name to avoid node name confict @node Ancient notation templates @section Ancient notation templates @@ -689,8 +789,11 @@ staves rather than on the staves. \version "2.4.0" global = { + \set Score.skipBars = ##t + % incipit \once \override Score.SystemStartBracket #'transparent = ##t + \override Score.SpacingSpanner #'spacing-increment = #1.0 % tight spacing \key f \major \time 2/2 \once \override Staff.TimeSignature #'style = #'neomensural @@ -706,6 +809,7 @@ global = { \bar "" % main + \revert Score.SpacingSpanner #'spacing-increment % CHECK: no effect? \cadenzaOff % turn bar lines on again \once \override Staff.Clef #'full-size-change = ##t \set Staff.forceClef = ##t @@ -721,13 +825,7 @@ global = { \set Staff.printKeyCancellation = ##t \set Staff.forceClef = ##f - \skip 1*5 - - % last bar contains a brevis (i.e., spans 2 bars); - % therefore do not draw this particular bar - \cadenzaOn - \skip 1*2 - \cadenzaOff + \skip 1*7 % the actual music % let finis bar go through all staves \override Staff.BarLine #'transparent = ##f @@ -1201,6 +1299,7 @@ violin concerto as TchaikovskyPI, whereas perhaps you wish to print composer = "Composer (xxxx-yyyy)" opus = "Opus 0" piece = "Piece I" + meter = "meter" instrument = "Instrument" arranger = "Arranger" poet = "Poet"