Aaron Hill <lilyp...@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