lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lilypond/Documentation/user examples.itely


From: Mats Bengtsson
Subject: Re: lilypond/Documentation/user examples.itely
Date: Fri, 07 Jan 2005 10:50:06 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040913

Maybe I miss something obvious, but I don't see any advantage of
using \tag for part extraction.
Why not simply do:

% Full score:
<<
 \new Staff { << \global \Violinone >> }
 \new Staff { << \global \Violintwo>> }
 \new Staff { << \global \Viola>> }
 \new Staff { << \global \Cello>> }
>>

% First violin part:
 \new Staff { << \global \Violinone >> }

...


   /Mats


Graham Percival wrote:
CVSROOT:        /cvsroot/lilypond
Module name:    lilypond
Branch:         
Changes by:     Graham Percival <address@hidden>  05/01/06 22:47:37

Modified files:
Documentation/user: examples.itely
Log message:
        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.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/Documentation/user/examples.itely.diff?tr1=1.28&tr2=1.29&r1=text&r2=text

Patches:
Index: lilypond/Documentation/user/examples.itely
diff -u lilypond/Documentation/user/examples.itely:1.28 
lilypond/Documentation/user/examples.itely:1.29
--- lilypond/Documentation/user/examples.itely:1.28     Wed Nov 17 09:55:42 2004
+++ lilypond/Documentation/user/examples.itely  Thu Jan  6 22:47:37 2005
@@ -11,7 +11,7 @@
 * Suggestions for writing LilyPond files::
 * Single staff::
 * Piano templates::
-* Small ensembles::
+* String quartet::
 * Vocal ensembles::
 * Ancient notation templates::
 * Jazz combo::
@@ -428,45 +428,47 @@
 @end lilypond
address@hidden Small ensembles
address@hidden Small ensembles
address@hidden String quartet
address@hidden 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 @@
 @end lilypond
address@hidden 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
address@hidden 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},
address@hidden, @code{vn2.ly}, @code{vla.ly}, and
address@hidden -- produce the appropiate part.
+
address@hidden
+%%%%% 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 { }
+}
address@hidden verbatim
+
+
 @node Vocal ensembles
 @section Vocal ensembles
@@ -1166,6 +1275,7 @@
 (@code{taor}, @code{grip}, @code{thrd}, etc), which can be reused easily.
@c TODO - replace Bagpipe template with Andrew McNabb's work?
address@hidden  http://www.mcnabbs.org/andrew/linux/lilypond-ghb/
@lilypond[quote,verbatim]
 taor = { \grace { g32[ d' g e'] } }


_______________________________________________
Lilypond-cvs mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/lilypond-cvs

--
=============================================
        Mats Bengtsson
        Signal Processing
        Signals, Sensors and Systems
        Royal Institute of Technology
        SE-100 44  STOCKHOLM
        Sweden
        Phone: (+46) 8 790 8463                         
        Fax:   (+46) 8 790 7260
        Email: address@hidden
        WWW: http://www.s3.kth.se/~mabe
=============================================




reply via email to

[Prev in Thread] Current Thread [Next in Thread]