On 23.03.2016 11:23, David Kastrup wrote:
Bernard <[email protected]> writes:Lilypond is highly flexible and many drumnotes are predefined. But I could not find info how to define my own drumnote. I tried : -------------------------------------------- \version "2.18.2" #(define mydrums '( (bassdrum default #f -1) (slap default #f 0))) one = \drummode { bd slap } \new DrumStaff \with { \override StaffSymbol #'line-count = #3 } << \set DrumStaff.drumStyleTable = #(alist->hash-table mydrums) \new DrumVoice { \voiceOne \one } --------------------------------------------- But this results an error. althougth drumnote "slap" is defined it can not be used.It can once it has been input. The drumStyleTable tells LilyPond how to typeset drum notes once they are in the music. It doesn't tell LilyPond what drum notes are permitted in music. So you need to use the existing names, or amend the parser. Amending the parser is done with drumPitchNames.slap = #'slap Note that you can define multiple names for the same definition in the drum style table, so you can also add drumPitchNames.sl = #'slap and this will work without further changes to mydrums.
Isn’t this the very latest 2.19.39 awesome alist syntax? Because the snip above states \version "2.18.2".
Best, Simon _______________________________________________ lilypond-user mailing list [email protected] https://lists.gnu.org/mailman/listinfo/lilypond-user
