lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Switching to drummode and back


From: Malte Meyn
Subject: Re: Switching to drummode and back
Date: Fri, 26 Aug 2016 11:40:46 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0



Am 26.08.2016 um 11:32 schrieb Sven Hillebrand:


\version "2.18.2"
{
   \repeat unfold 8 {e''8}
   \drummode { \clef percussion
  hh4. r4. hh4.  }
   \clef bass d1
}

Is there a way to make it look like the original in the attachment?

Displaying percussion music in \drummode needs a DrumStaff instead of a Staff but “normal” notes need a Staff. So you have to create a DrumStaff (either \new DrumStaff \drummode or by using the shorthand \drums). Now this will of course print an *extra* DrumStaff below the staff. This is because Staff contexts accept Voice contexts and some others by default but not other Staffs or DrumStaffs (a staff in a staff generally makes not much sense). This can be changed in the \with block:

\version "2.18.2"

\new Staff \with {
  \accepts DrumStaff
} {
  \repeat unfold 8 {e''8}
  \drums {
    hh4. r4. hh4
    % else an additional clef would be printed
    \once \omit DrumStaff.Clef
  }
  \clef bass d1
}



reply via email to

[Prev in Thread] Current Thread [Next in Thread]