\version "2.15.36" %#(define glyph-types '("0laThin" % "1laThin" % "2laThin")) %customChineseCymbalNoteHead = \override NoteHead #'stencil = %#(lambda (grob) % (let* ((gl (ly:grob-property grob 'glyph-name)) % (dur (ly:grob-property grob 'duration-log))) % (if (member gl glyph-types) % (ly:stencil-add % (grob-interpret-markup grob (markup #:fontsize 1.65 % #:musicglyph "noteheads.s1laFunk")) % (if (or (= dur 1) (= dur 0)) % (grob-interpret-markup grob (markup #:fontsize -2.25 % #:musicglyph "noteheads.s1cross")) % (grob-interpret-markup grob (markup #:fontsize -1.25 % #:musicglyph "noteheads.s2cross")))) % (ly:note-head::print grob)))) %#(define my-drums '((halfopenhihat cross "halfopen" 3) % (chinesecymbal laThin #f 5))) changeDrumStyleTable = #(define-music-function (parser location)() (make-music 'ApplyContext 'procedure (lambda (x) (let* ((ctx (ly:context-property-where-defined x 'drumStyleTable)) (dr-st-tab (ly:context-property ctx 'drumStyleTable))) (hashq-set! dr-st-tab 'ridecymbal '(doThin #f 6)) (hashq-set! dr-st-tab 'electricsnare '(mensural #f 1)) )))) %--- Test mains = \drummode { r4 sna r4 sne8 r8 | r2 sna8 sne16 sne16 sne16 sne16 sna8 | 4 r4 sne8 r8 r4 | cymr2 cymr4 cymr8 cymr16 cymr32 cymr32 | % c'est ridecymbal R1 | % Pour utiliser 2 rides différentes: cymra2 cymra4 cymra8 cymra16 cymra32 cymra32 | % c'est ridecymbala cymrb1 | % c'est ridecymbalb rb1 | % c'est ridebell } pieds = \drummode { bd4 r4 bd r4 | bd8 r8 r4 r2 | r4 r4 r2 | } \new DrumStaff \with { \changeDrumStyleTable % drumStyleTable = #(alist->hash-table ma_notation) \override DrumStaff #'TimeSignature #'style = #'() % \override NoteHead #'font-size = #-3 % \consists "Parenthesis_engraver" } << \new DrumVoice { \voiceOne \mains } \new DrumVoice { \voiceTwo \pieds } % \override DrumStaff.NoteCollision #'merge-differently-headed = ##t % \override DrumStaff.NoteCollision #'merge-differently-dotted = ##t >>