For parts where the percussionist switches from vibraphone to maracas, for example, is there a way to combine the two on the same staff? IIRC, LilyPond treats normal staves and percussion staffs completely separately.
1 Answer
I fear the only thing you can try is to just use a pitched staff for the maracas. You can adjust the visibility of accidentals and the line count of the system with overrides.
I am not fully sure, how your score will look in the end, but perhaps you could start like this:
\version "2.18.2"
startMaracas = {
\stopStaff
\override Staff.StaffSymbol.line-count = #1
\override Staff.Accidental.stencil = ##f
\override NoteHead.style = #'cross
\startStaff
\once \override Staff.BarLine.bar-extent = #'(-2 . 2)
}
endMaracas = {
\stopStaff
\revert Staff.StaffSymbol.line-count
\revert Staff.Accidental.stencil
\revert NoteHead.style
\startStaff
}
\score {
<<
\new Staff {
c'4^\markup{ "Vibraphone" } d' e' f'
c'4 d' e' f'
\startMaracas
bes'4^\markup{ "Maracas" } bes' bes' bes'
bes'4 bes' bes' bes'
\endMaracas
c'4^\markup{ "Vibraphone" } d' e' f'
c'4 d' e' f'
}
>>
}
Rendering as:
You can add the following function to your code if you want to use \changeInstrument "maracas"
or \changeInstrument "somethingelse"
instead of the defined macros:
changeInstrument = #(define-music-function (parser location instrument) (string?)
(if (equal? instrument "maracas")
#{ \startMaracas #}
#{ \endMaracas #} )
)
-
Could
\startMaracas
and\endMaracas
be refactored to\instrumentSwitch "vibes"
and\instrumentSwitch "maracas"
(with the accompanying instrument switch definitions more or less identical to your start & end maracas definitions)?– cjmCommented Oct 15, 2019 at 2:41 -
You could add a short scheme function to redefine your code. See my edit. Commented Oct 15, 2019 at 8:41
-
2I've been studying the score for a concert band piece lately (Shadow Rituals by Michael Markowski), and in that piece, I've seen unpitched percussion instruments share five-line staves with pitched percussion instruments. Commented Oct 15, 2019 at 10:20
\drummode
is completely useless for the vibraphone sections of the part: the vibes need normal note entry.