Custom percussion style is ignored for the first note when it is a grace note

Stu McKenzie <[email protected]>
Newsgroups gmane.comp.gnu.lilypond.bugs
Message-ID <[email protected]>
There seems to have been various reports of bugs when the first note is 
a grace note, but this bug has been in many LilyPond versions to date.

When the first note of a drum score has a grace note, LilyPond outputs 
the default note, rather than the custom percussion style.

In this case, \acciaccatura is used to create each grace note - main 
note combination.

Here's a "Tiny example":

\version "2.24.0"
#(define mydrums '( (hightom default #f 3)))
\score {
   \new DrumStaff <<
     \set DrumStaff.drumStyleTable = #(alist->hash-table mydrums)
     \new DrumVoice { \voiceTwo \drummode { \partial 2 \acciaccatura 
tomh8 tomh4 \acciaccatura tomh8 tomh4 } }
   >>
}

The first combination outputs the default tomh for the first grace note, 
with the main note output from the custom mydrums.

The second combination produces the expected output.

Here's a workaround (full bar instead of partial, which is not what was 
required):

\version "2.24.0"
#(define mydrums '( (hightom default #f 3)))
\score {
   \new DrumStaff <<
     \set DrumStaff.drumStyleTable = #(alist->hash-table mydrums)
     \new DrumVoice { \voiceTwo \drummode { r2 \acciaccatura tomh8 tomh4 
\acciaccatura tomh8 tomh4 } }
   >>
}
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.