(Normally it's a good idea to read the emails in reverse order to avoid answering a question that has already been answered by others, but in this case it was a mistake not to have read the earlier emails related to the subject.)
Now I realize that you did this to get an example of how to use \tag. Still, the problem is that it doesn't really show any advantage (as far as I can see). Can't we find a better example where the command gives a clearer advantage?
/Mats
Mats Bengtsson wrote:
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 <[EMAIL PROTECTED]> 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
[EMAIL PROTECTED] Small ensembles
[EMAIL PROTECTED] Small ensembles
[EMAIL PROTECTED] String quartet
[EMAIL PROTECTED] 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
[EMAIL PROTECTED] 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
[EMAIL PROTECTED] 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},
[EMAIL PROTECTED], @code{vn2.ly}, @code{vla.ly}, and
[EMAIL PROTECTED] -- produce the appropiate part.
+
[EMAIL PROTECTED]
+%%%%% 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 { }
+}
[EMAIL PROTECTED] 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?
[EMAIL PROTECTED] http://www.mcnabbs.org/andrew/linux/lilypond-ghb/
@lilypond[quote,verbatim]
taor = { \grace { g32[ d' g e'] } }
_______________________________________________ Lilypond-cvs mailing list [EMAIL PROTECTED] 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: [EMAIL PROTECTED] WWW: http://www.s3.kth.se/~mabe =============================================
_______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel