lilypond-user
[Top][All Lists]
Advanced

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

combine different note heads (drumset)


From: Daniel E. Moctezuma
Subject: combine different note heads (drumset)
Date: Sun, 22 May 2016 17:34:30 +0900
User-agent: Mutt/1.6.0 (2016-04-01)

Hello,

I would like to define a note head type (or modify/tweak an existing one) that 
uses a combination of 2 existing note heads from the Feta font.
I'm trying to use the notation proposed by Norman Weinberg in his book Guide to 
Standardized Drumset Notation.

Hi-Hat and Cymbals for instance use both Cross and Diamond shape note heads as 
follows:
1. Half-note and whole-note use a diamond, very similar to s0miThin except the 
height of s0miThin is kind of short.
2. Quarter-note and below use a cross shaped note-head such as s2cross.

I did manage to make Lilypond show the above note heads accordingly using 
tweaks.
The disadvantage is that in order to achieve the desired result I would have to 
do something like "\customDiamond cymc2" every time I have to input half or 
whole notes.
So I'm looking for an easier way to input those kind of notes as well as to 
support chords.

In the following sample code you can see how modifying the stencil can give you 
somewhat what I'm looking for, but here are some concerns:
1. It doesn't work when using chords (for example: hitting the crash cymbal and 
the snare drum at the same time).
2. When using s0miThin noteheads the stem is not conected to the diamond's left 
vertex.

Maybe a better approach could be, instead of the "cross" note head defined in 
"mydrums" drum style table could be something like "crossdiamond" so it can 
include the above mentioned note heads.
Probably just modifying the existing "cross" notehead could be enough since 
Weinberg's book doesn't mention any usage of both s0cross and s1cross.

Do you have any ideas on how to achieve something like this, as well as to fix 
the above 2 points mentioned?

Sample:

\version "2.18.2"

#(define mydrums '(
         (crashcymbal cross #f 6)))

% Based on: https://www.mail-archive.com/lilypond-user%40gnu.org/msg108679.html
#(define (my-note-head grob)
  (let ((duration (ly:grob-property grob 'duration-log)))
   (if (>= duration 2)
    (grob-interpret-markup grob
     (markup #:musicglyph "noteheads.s2cross"))
    (grob-interpret-markup grob
     (markup #:scale (cons -0.65 1.2)
             #:musicglyph "noteheads.s0miThin")))))

\new DrumStaff <<
  \set DrumStaff.drumStyleTable = #(alist->hash-table mydrums)

  \drummode {
    \cadenzaOn
    \autoBeamOff
    \override NoteHead.stencil = #my-note-head
    cymc32 cymc16 cymc8 cymc4 cymc2 cymc1 \bar "|."
  }
>>

--
Best regards



reply via email to

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