color returned defaults to black.
@lilypond[verbatim,quote]
-\relative c'' {
- \override Staff.StaffSymbol.color = #(x11-color 'SlateBlue2)
- \set Staff.instrumentName = \markup {
- \with-color #(x11-color 'navy) "Clarinet"
+\new Staff \with {
+ instrumentName = \markup {
+ \with-color #(x11-color 'red) "Clarinet"
+ }
}
-
+ \relative c'' {
+ \override Staff.StaffSymbol.color = #(x11-color 'SlateBlue2)
gis8 a
\override Beam.color = #(x11-color "medium turquoise")
gis a
@code{rgb-color}.
@lilypond[verbatim,quote]
+\new Staff \with {
+ instrumentName = \markup {
+ \with-color #(x11-color 'red) "Clarinet"
+ }
+ }
\relative c'' {
\override Staff.StaffSymbol.color = #(x11-color 'SlateBlue2)
- \set Staff.instrumentName = \markup {
- \with-color #(x11-color 'navy) "Clarinet"
- }
-
\override Stem.color = #(rgb-color 0 0 0)
gis8 a
\override Stem.color = #(rgb-color 1 1 1)
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
@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
#(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
\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
@lilypond[verbatim,quote]
\new GrandStaff <<
- \new Staff = "violin" {
- \relative c'' {
- \set Staff.instrumentName = #"Vln"
- \set Staff.midiInstrument = #"violin"
- % not strictly necessary, but a good reminder
- \transposition c'
-
- \key c \major
- g4( c8) r c r c4
- }
+ \new Staff = "violin" \with {
+ instrumentName = #"Vln"
+ midiInstrument = #"violin"
}
- \new Staff = "clarinet" {
- \relative c'' {
- \set Staff.instrumentName = \markup { Cl (B\flat) }
- \set Staff.midiInstrument = #"clarinet"
- \transposition bes
-
- \key d \major
- a4( d8) r d r d4
- }
+ \relative c'' {
+ % not strictly necessary, but a good reminder
+ \transposition c'
+ \key c \major
+ g4( c8) r c r c4
+ }
+ \new Staff = "clarinet" \with {
+ instrumentName = \markup { Cl (B\flat) }
+ midiInstrument = #"clarinet"
+ }
+ \relative c'' {
+ \transposition bes
+ \key d \major
+ a4( d8) r d r d4
}
>>
@end lilypond
details, see @ref{Instrument names}.
@lilypond[verbatim,quote]
-\new PianoStaff <<
- \set PianoStaff.instrumentName = #"Piano"
+\new PianoStaff \with { instrumentName = #"Piano" }
+<<
\new Staff \relative { c''1 c }
\new Staff \relative { \clef bass c1 c }
>>
@lilypond[verbatim,quote,ragged-right]
prepPiccolo = <>^\markup \italic { muta in Piccolo }
+prepFlute = <>^\markup \italic { muta in Flauto }
+
setPiccolo = {
- \set Staff.instrumentName = #"Piccolo"
- \set Staff.shortInstrumentName = #"Picc."
- \set Staff.midiInstrument = #"piccolo"
<>^\markup \bold { Piccolo }
\transposition c''
}
-prepFlute = <>^\markup \italic { muta in Flauto }
-
setFlute = {
- \set Staff.instrumentName = #"Flute"
- \set Staff.shortInstrumentName = #"Flt."
- \set Staff.midiInstrument = #"flute"
<>^\markup \bold { Flute }
\transposition c'
}
\new Staff \with {
instrumentName = #"Flute"
shortInstrumentName = #"Flt."
- midiInstrument = #"flute"
}
\relative {
g'1 g g g \break
g1 g \prepPiccolo R R \break
+ \set Staff.instrumentName = #"Piccolo"
+ \set Staff.shortInstrumentName = #"Picc."
\setPiccolo
g1 g g g \break
g1 g \prepFlute R R \break
+ \set Staff.instrumentName = #"Flute"
+ \set Staff.shortInstrumentName = #"Flt."
\setFlute
g1 g g g
}