[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Explicit placement of rests in a percussion staff
From: |
David Kastrup |
Subject: |
Re: Explicit placement of rests in a percussion staff |
Date: |
Sat, 27 Feb 2021 12:41:56 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Aaron Hill <lilypond@hillvisions.com> writes:
> On 2021-02-27 3:10 am, David Kastrup wrote:
>> [...] Which begs the
>> question whether it would not make sense to let Rest_engraver look at
>> drum-type in the same manner it looks at pitch for the sake of
>> potentially resolving the drum-type to staff-position mapping.
>
> I'm not a percussionist; but it would seem reasonable for "sn \rest"
> to work the same as "fis \rest".
>
> I take it parser.yy would need updating to something like this:
>
> ////
> simple_element:
> DRUM_PITCH optional_notemode_duration optional_rest {
> Music *n = 0;
> if (scm_is_true ($3))
> n = MY_MAKE_MUSIC ("RestEvent", @$);
> else
> n = MY_MAKE_MUSIC ("NoteEvent", @$);
> set_property (n, "duration", $2);
> set_property (n, "drum-type", $1);
>
> $$ = n->unprotect ();
> }
> ////
Yes, something like that. The main question is just to what degree
factoring out code from Drum_notes_engraver makes sense or whether one
would just hard-code inline the more limited extraction of just the
position.
--
David Kastrup
Re: Explicit placement of rests in a percussion staff, Thomas Morley, 2021/02/27