[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: |
Thomas Morley |
Subject: |
Re: Custom percussion style is ignored for the first note when it is a grace note |
Date: |
Wed, 25 Jan 2023 22:11:33 +0100 |
Am Mi., 25. Jan. 2023 um 17:54 Uhr schrieb David Kastrup <dak@gnu.org>:
>
> 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
>
It's unfortunate that we provide an example like:
\new DrumStaff <<
\set DrumStaff.drumStyleTable = #(alist->hash-table mydrums)
\new DrumVoice { \voiceOne \up }
\new DrumVoice { \voiceTwo \down }
>>
as first code example in NR 2.5 Percussion Custom percussion staves.
I've put up https://gitlab.com/lilypond/lilypond/-/merge_requests/1822
to fix the docs
Cheers,
Harm