lilypond-user
[Top][All Lists]
Advanced

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

Re: Custom percussion staves


From: ebenezer
Subject: Re: Custom percussion staves
Date: Thu, 28 Jan 2021 17:57:20 +0000
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0

Thank you Aaron,

Ah, makes sense. I prefer the way you suggested and have it working.

Cheers.


On 2021-01-28 15:19, Aaron Hill wrote:
On 2021-01-28 4:35 am, ebenezer wrote:
Hello everyone,

I have noticed that use of a custom percussion staff is different from
the manner in which one of the pre-defined percussion staves is used:

partBongo = \new DrumStaff \with {
  drumStyleTable = #bongos-style
} \staffBongo

... compared to ...

partPercCustom = \new DrumStaff \with {
  % -- drumStyleTable = #defPercCustom  % -- this doesn't work
} <<
  \set DrumStaff.drumStyleTable = #(alist->hash-table defPercCustom)
% -- works this way


Is this just the way it is, or am I missing something?

bongos-style (and its kin) are hash tables, which is what drumStyleTable expects. The documentation shows defining a custom drum style as an alist and then converting it to a hash table when you use it. An alternative would be to do the conversion when you define the style:

%%%%
\version "2.22.0"

custom-drum-style =
#(alist->hash-table
  '((bassdrum default "tenuto" -1)
    (snare diamond #f 0)
    (hihat cross #f 1)))

\new DrumStaff
\with { drumStyleTable = #custom-drum-style }
\drummode { bd4 hh8 8 sn2 }
%%%%


-- Aaron Hill




reply via email to

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