bug-lilypond
[Top][All Lists]
Advanced

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

Re: Custom percussion style is ignored for the first note when it is a g


From: David Kastrup
Subject: Re: Custom percussion style is ignored for the first note when it is a grace note
Date: Wed, 25 Jan 2023 17:54:04 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Stu McKenzie <swwsoft@handsmck.com> writes:

> 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 } }
>   >>
> }

This is not a bug.  You specify you _want_ simultaneous music by using
<< ... >> and the settings of DrumStaff.drumStyleTable are performed
_on_ the beat while the grace notes are performed _before_ the beat.

This is _exactly_ as you tell LilyPond you want things to happen.  If
you want to have things to happen in sequence, you have to write them in
sequence.

Using { ... } instead of << ... >> here probably gives something closer
to your expectations.

Now for things that _pervade_ a context rather than switch around, it
makes sense not to set them at the first time step but generally, by
using a \with block:

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

-- 
David Kastrup



reply via email to

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