]> git.donarmstrong.com Git - lilypond.git/blobdiff - Documentation/snippets/jazz-combo-template.ly
Snippets: Replace \set Staff.instrumentName
[lilypond.git] / Documentation / snippets / jazz-combo-template.ly
index 4f0570da2c59e251d2e7572876132ae3e775a3b3..f16a6970a096de589dc179f06367173af20cce80 100644 (file)
@@ -4,11 +4,11 @@
 % and then run scripts/auxiliar/makelsr.py
 %
 % This file is in the public domain.
-%% Note: this file works from version 2.17.30
-\version "2.17.30"
+%% Note: this file works from version 2.19.56
+\version "2.19.56"
 
 \header {
-  lsrtags = "keyboards, percussion, fretted-strings, template, real-music"
+  lsrtags = "fretted-strings, keyboards, percussion, real-music, template"
 
   texidoc = "
 This is quite an advanced template, for a jazz ensemble. Note that all
@@ -20,7 +20,6 @@ music is within a @code{\\transpose} section.
   doctitle = "Jazz combo template"
 } % begin verbatim
 
-
 \header {
   title = "Song"
   subtitle = "(tune)"
@@ -31,10 +30,14 @@ music is within a @code{\\transpose} section.
     \column {
       "LilyPond example file by Amelie Zapf,"
       "Berlin 07/07/2003"
-    }
+    } % begin verbatim
+
   }
 }
-
+% To make the example display in the documentation
+\paper {
+  paper-width = 130
+}
 %#(set-global-staff-size 16)
 \include "english.ly"
 
@@ -73,7 +76,6 @@ trpHarmony = \transpose c' d {
 }
 trumpet = {
   \global
-  \set Staff.instrumentName = #"Trumpet"
   \clef treble
   <<
     \trpt
@@ -90,7 +92,6 @@ altoHarmony = \transpose c' a {
 }
 altoSax = {
   \global
-  \set Staff.instrumentName = #"Alto Sax"
   \clef treble
   <<
     \alto
@@ -111,7 +112,6 @@ bariHarmony = \transpose c' a \chordmode {
 }
 bariSax = {
   \global
-  \set Staff.instrumentName = #"Bari Sax"
   \clef treble
   <<
     \bari
@@ -128,7 +128,6 @@ tboneHarmony = \chordmode {
 }
 trombone = {
   \global
-  \set Staff.instrumentName = #"Trombone"
   \clef bass
   <<
     \tbone
@@ -152,7 +151,6 @@ gtrHarmony = \chordmode {
 }
 guitar = {
   \global
-  \set Staff.instrumentName = #"Guitar"
   \clef treble
   <<
     \gtr
@@ -185,7 +183,6 @@ lhLower = \relative c {
 PianoRH = {
   \clef treble
   \global
-  \set Staff.midiInstrument = #"acoustic grand"
   <<
     \new Voice = "one" \rhUpper
     \new Voice = "two" \rhLower
@@ -194,7 +191,6 @@ PianoRH = {
 PianoLH = {
   \clef bass
   \global
-  \set Staff.midiInstrument = #"acoustic grand"
   <<
     \new Voice = "one" \lhUpper
     \new Voice = "two" \lhLower
@@ -203,7 +199,6 @@ PianoLH = {
 
 piano = {
   <<
-    \set PianoStaff.instrumentName = #"Piano"
     \new Staff = "upper" \PianoRH
     \new Staff = "lower" \PianoLH
   >>
@@ -216,7 +211,6 @@ Bass = \relative c {
 }
 bass = {
   \global
-  \set Staff.instrumentName = #"Bass"
   \clef bass
   <<
     \Bass
@@ -240,7 +234,6 @@ down = \drummode {
 drumContents = {
   \global
   <<
-    \set DrumStaff.instrumentName = #"Drums"
     \new DrumVoice \up
     \new DrumVoice \down
   >>
@@ -251,19 +244,31 @@ drumContents = {
 \score {
   <<
     \new StaffGroup = "horns" <<
-      \new Staff = "trumpet" \trumpet
-      \new Staff = "altosax" \altoSax
-      \new ChordNames = "barichords" \bariHarmony
-      \new Staff = "barisax" \bariSax
-      \new Staff = "trombone" \trombone
+      \new Staff = "trumpet" \with { instrumentName = #"Trumpet" }
+      \trumpet
+      \new Staff = "altosax" \with { instrumentName = #"Alto Sax" }
+      \altoSax
+      \new ChordNames = "barichords" \with { instrumentName = #"Trumpet" }
+      \bariHarmony
+      \new Staff = "barisax" \with { instrumentName = #"Bari Sax" }
+      \bariSax
+      \new Staff = "trombone" \with { instrumentName = #"Trombone" }
+      \trombone
     >>
 
     \new StaffGroup = "rhythm" <<
       \new ChordNames = "chords" \gtrHarmony
-      \new Staff = "guitar" \guitar
-      \new PianoStaff = "piano" \piano
-      \new Staff = "bass" \bass
-      \new DrumStaff \drumContents
+      \new Staff = "guitar" \with { instrumentName = #"Guitar" }
+      \guitar
+      \new PianoStaff = "piano" \with {
+        instrumentName = #"Piano"
+        midiInstrument = #"acoustic grand"
+      }
+      \piano
+      \new Staff = "bass" \with { instrumentName = #"Bass" }
+      \bass
+      \new DrumStaff \with { instrumentName = #"Drums" }
+      \drumContents
     >>
   >>
   \layout {