[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: drummode and notemode
From: |
David Kastrup |
Subject: |
Re: drummode and notemode |
Date: |
Wed, 29 Aug 2012 23:48:50 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) |
Curt <address@hidden> writes:
>> On Aug 29, 2012, at 12:33 PM, David Kastrup wrote:
>>
>> Try
>>
>> \include "english.ly"
>>
>> \drums \with { \accepts "Voice" }
>> {
>> ss hh
>> \new Voice { \notemode { \clef treble a b c } }
>> }
>
> ah-ha! Thank you David!! I'll read deeper on \with and \accepts.
Good luck with that... I am not really sure this is a proper solution:
it allows Voice to be part of a drum staff. Taking a look at
ly/engraver-init.ly, we see
\context {
\Staff
\type "Engraver_group"
\name "DrumStaff"
\alias "Staff"
\remove "Accidental_engraver"
\remove "Ottava_spanner_engraver"
\remove "Key_engraver"
\remove "Piano_pedal_engraver"
\description "Handles typesetting for percussion."
\denies "Voice"
\accepts "DrumVoice"
\defaultchild "DrumVoice"
clefGlyph = #"clefs.percussion"
clefPosition = #0
\override Script #'staff-padding = #0.75
}
Not having the accidental engraver (as compared to the DrumStaff) is
probably a no-go. It turns out that being rather blasé about the proper
hierarchy does a more thorough job. Note that the acceptance of a
recursive drum staff is for the sake of getting a new clef and meter
when resuming in drum mode:
\include "english.ly"
\drums \with { \accepts "Staff" \accepts "DrumStaff" }
{
ss hh
\new Voice { \notemode { \key a\major \clef treble a bf c } }
\drums { ss hh }
}
Note that accepting Staff means that starting a Voice will call in a
Staff context nested in the DrumStaff implied with \drums.
Like with the previous example, I am somewhat skeptic that this will
work under all important circumstances, but it looks like a somewhat
feasible hack, and at least seems to do a bit more than my first
proposal.
--
David Kastrup