]> git.donarmstrong.com Git - lilypond.git/blobdiff - Documentation/notation/percussion.itely
NR: Replace \set Staff.instrumentName
[lilypond.git] / Documentation / notation / percussion.itely
index c6502992b0796ddf8dd53ed75090f895b7a20d77..da730eb5f3b944bf72299b193d0ced9cbf8eb5cd 100644 (file)
@@ -466,27 +466,22 @@ delicate things have a look at @ref{Staff symbol}.
 
 A tambourine, entered with @q{tamb}:
 
-@lilypond[quote,verbatim]
+@lilypond[verbatim,quote]
 #(define mydrums '((tambourine default #t 0)))
 
-tambustaff = {
-  \override Staff.StaffSymbol.line-positions = #'( 0 )
-  \override Staff.BarLine.bar-extent = #'(-1.5 . 1.5)
-  \set DrumStaff.instrumentName = #"Tambourine"
-}
+\new DrumStaff \with { instrumentName = #"Tambourine" }
 
-\new DrumStaff {
-  \tambustaff
+\drummode {
   \set DrumStaff.drumStyleTable = #(alist->hash-table mydrums)
+  \override Staff.StaffSymbol.line-positions = #'( 0 )
+  \override Staff.BarLine.bar-extent = #'(-1.5 . 1.5)
 
-  \drummode {
-    \time 6/8
-    tamb8. 16 8 8 8 8 |
-    tamb4. 8 8 8 |
-    % the trick with the scaled duration and the shorter rest
-    % is neccessary for the correct ending of the trill-span!
-    tamb2.*5/6 \startTrillSpan s8 \stopTrillSpan |
-  }
+  \time 6/8
+  tamb8. 16 8 8 8 8 |
+  tamb4. 8 8 8 |
+  % the trick with the scaled duration and the shorter rest
+  % is neccessary for the correct ending of the trill-span!
+  tamb2.*5/6 \startTrillSpan s8 \stopTrillSpan |
 }
 @end lilypond
 
@@ -495,19 +490,14 @@ Music for Tam-Tam (entered with @q{tt}):
 @lilypond[quote,verbatim]
 #(define mydrums '((tamtam default #t 0)))
 
-tamtamstaff = {
-  \override Staff.StaffSymbol.line-positions = #'( 0 )
-  \override Staff.BarLine.bar-extent = #'(-1.5 . 1.5)
-  \set DrumStaff.instrumentName = #"Tamtam"
-}
+\new DrumStaff \with { instrumentName = #"Tamtam" }
 
-\new DrumStaff {
-  \tamtamstaff
-  \set DrumStaff.drumStyleTable = #(alist->hash-table mydrums)
+\drummode {
+\set DrumStaff.drumStyleTable = #(alist->hash-table mydrums)
+\override Staff.StaffSymbol.line-positions = #'( 0 )
+\override Staff.BarLine.bar-extent = #'(-1.5 . 1.5)
 
-  \drummode {
-    tt 1 \pp \laissezVibrer
-  }
+  tt 1 \pp \laissezVibrer
 }
 @end lilypond
 
@@ -517,20 +507,16 @@ Two different bells, entered with @q{cb} (cowbell) and @q{rb} (ridebell)
 #(define mydrums '((ridebell default #t  3)
                    (cowbell  default #t -2)))
 
-bellstaff = {
-  \override DrumStaff.StaffSymbol.line-positions = #'(-2 3)
+\new DrumStaff \with { instrumentName = #"Different Bells" }
+
+\drummode {
   \set DrumStaff.drumStyleTable = #(alist->hash-table mydrums)
+  \override DrumStaff.StaffSymbol.line-positions = #'(-2 3)
   \override Staff.BarLine.bar-extent = #'(-1.5 . 1.5)
-  \set DrumStaff.instrumentName = #"Different Bells"
-}
 
-\new DrumStaff {
-  \bellstaff
-  \drummode {
-    \time 2/4
-    rb8 8 cb8 16 rb16-> ~ |
-    16 8 16 cb8 8 |
-  }
+  \time 2/4
+  rb8 8 cb8 16 rb16-> ~ |
+  16 8 16 cb8 8 |
 }
 @end lilypond
 
@@ -575,22 +561,22 @@ drumsB = {
 
 \score {
   \new StaffGroup <<
-    \new DrumStaff {
-      \set DrumStaff.instrumentName = \markup {
+    \new DrumStaff \with {
+      instrumentName = \markup {
         \column {
           "Tambourine"
           "et"
           "caisse claire s. timbre"
         }
       }
-      \set DrumStaff.drumStyleTable = #(alist->hash-table mydrums)
-      \drumsA
-    }
-
-   \new DrumStaff {
-     \set DrumStaff.instrumentName = #"Grosse Caisse"
-     \set DrumStaff.drumStyleTable = #(alist->hash-table mydrums)
-     \drumsB }
+    drumStyleTable = #(alist->hash-table mydrums)
+  }
+  \drumsA
+  \new DrumStaff \with {
+    instrumentName = #"Grosse Caisse"
+    drumStyleTable = #(alist->hash-table mydrums)
+  }
+  \drumsB
   >>
 }
 @end lilypond