From: Graham Percival Date: Thu, 6 Jan 2005 22:47:37 +0000 (+0000) Subject: Adding string quartet \tag part extraction. Large section with X-Git-Tag: release/2.5.14~309 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=302b6147551ed3a53e526798e2913f876bf95eed;p=lilypond.git Adding string quartet \tag part extraction. Large section with @verbose. I think it's ok, but if anything breaks web-doc, it would be this untested patch. --- diff --git a/Documentation/user/examples.itely b/Documentation/user/examples.itely index 53a68f0c93..2190029fc7 100644 --- a/Documentation/user/examples.itely +++ b/Documentation/user/examples.itely @@ -11,7 +11,7 @@ beautiful printed scores! * Suggestions for writing LilyPond files:: * Single staff:: * Piano templates:: -* Small ensembles:: +* String quartet:: * Vocal ensembles:: * Ancient notation templates:: * Jazz combo:: @@ -428,45 +428,47 @@ pedal = { @end lilypond -@node Small ensembles -@section Small ensembles +@node String quartet +@section String quartet @subsection String quartet 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" -global = { - \time 4/4 - \key c \major -} +version "2.4.0" -violinOne = \relative c''{ - \set Staff.instrument = "Violin 1 " - c2 d - e1 +global= { + \time 4/4 + \key c \major } -violinTwo = \relative c''{ - \set Staff.instrument = "Violin 2 " - g2 g - g1 -} +Violinone = \new Voice { \relative c''{ + \set Staff.instrument = "Violin 1 " -viola = \relative c'{ - \set Staff.instrument = "Viola " - \clef alto - e2 d - c1 -} + c2 d e1 -cello = \relative c'{ - \set Staff.instrument = "Cello " - \clef bass - c2 g - c,1 -} +\bar "|." }} +Violintwo = \new Voice { \relative c''{ + \set Staff.instrument = "Violin 2 " + + g2 f e1 + +\bar "|." }} +Viola = \new Voice { \relative c' { + \set Staff.instrument = "Viola " + \clef alto + + e2 d c1 + +\bar "|." }} +Cello = \new Voice { \relative c' { + \set Staff.instrument = "Cello " + \clef bass + + c2 b a1 + +\bar "|."}} %********************************** \score { \new StaffGroup << @@ -481,6 +483,113 @@ cello = \relative c'{ @end lilypond +@subsection String quartet parts + +The previous example produces a nice string quartet, but what if you +needed to print parts? This template demonstrates how to use the +@code{\tag} feature to easily split a piece into individual parts. + +You need to split this template into separate files; the filenames +are contained in comments at the beginning of each file. @code{piece.ly} +contains all the music definitions. The other files -- @code{score.ly}, +@code{vn1.ly}, @code{vn2.ly}, @code{vla.ly}, and +@code{vlc.ly} -- produce the appropiate part. + +@verbatim +%%%%% piece.ly +\version "2.4.0" + +global= { + \time 4/4 + \key c \major +} + +Violinone = \new Voice { \relative c''{ + \set Staff.instrument = "Violin 1 " + + c2 d e1 + +\bar "|." }} %********************************* +Violintwo = \new Voice { \relative c''{ + \set Staff.instrument = "Violin 2 " + + g2 f e1 + +\bar "|." }} %********************************* +Viola = \new Voice { \relative c' { + \set Staff.instrument = "Viola " + \clef alto + + e2 d c1 + +\bar "|." }} %********************************* +Cello = \new Voice { \relative c' { + \set Staff.instrument = "Cello " + \clef bass + + c2 b a1 + +\bar "|."}} %********************************** + +music = { + << + \tag #'(score vn1) \new Staff { << \global \Violinone >> } + \tag #'(score vn2) \new Staff { << \global \Violintwo>> } + \tag #'(score vla) \new Staff { << \global \Viola>> } + \tag #'(score vlc) \new Staff { << \global \Cello>> } + >> +} + + + +%%%%% score.ly +\version "2.4.0" +\include "piece.ly" +#(set-global-staff-size 14) +\score { + \new StaffGroup \keepWithTag #'score \music + \layout { } + \midi { \tempo 4 = 60 } +} + + +%%%%% vn1.ly +\version "2.4.0" +\include "piece.ly" +\score { + \keepWithTag #'vn1 \music + \layout { } +} + + +%%%%% vn2.ly +\version "2.4.0" +\include "piece.ly" +\score { + \keepWithTag #'vn2 \music + \layout { } +} + + +%%%%% vla.ly +\version "2.4.0" +\include "piece.ly" +\score { + \keepWithTag #'vla \music + \layout { } +} + + +%%%%% vlc.ly +\version "2.4.0" +\include "piece.ly" +\score { + \keepWithTag #'vlc \music + \layout { } +} +@end verbatim + + @node Vocal ensembles @section Vocal ensembles @@ -1166,6 +1275,7 @@ completely. This template defines a large number of small segments (@code{taor}, @code{grip}, @code{thrd}, etc), which can be reused easily. @c TODO - replace Bagpipe template with Andrew McNabb's work? +@c http://www.mcnabbs.org/andrew/linux/lilypond-ghb/ @lilypond[quote,verbatim] taor = { \grace { g32[ d' g e'] } }