4

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.

4
  • Did you check the Lilypond Documentation online (lilypond.org/doc/v2.18/Documentation/notation/…)? It is totally possible to combine different percussion instruments in one staff. If the documentation does not contain your specific problem, please explain a bit more detailed what you want to achieve. Commented Oct 14, 2019 at 17:53
  • I was specifically referring to pitches and unpitched instruments sharing a staff. \drummode is completely useless for the vibraphone sections of the part: the vibes need normal note entry.
    – cjm
    Commented Oct 14, 2019 at 19:45
  • Okay, I understand. But I fear the only thing you can try is just using a pitched staff for the maracas as well. If you need midi output you can add an invisible additional drum staff that is just used for midi output. Commented Oct 14, 2019 at 21:11
  • Say the maracas are a B-flat and override the staff to have one line and give an x notehead?
    – cjm
    Commented Oct 14, 2019 at 22:01

1 Answer 1

3

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:

enter image description here


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 #} ) 
  )
3
  • 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)?
    – cjm
    Commented 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
  • 2
    I'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.
    – Dekkadeci
    Commented Oct 15, 2019 at 10:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.