Awesome!!!!!!!

That is just what I wanted.


Thanks so much Aaron



> On September 10, 2018 at 12:31 PM Aaron Hill wrote:
> 
> 
>     On 2018-09-09 4:46 pm, OTIS DOSS III wrote:
> 
>         > > As my subject indicates, I want to display a rim shot, which is
> >         typically indicated by a note with a diagonal slash:
> > 
> >         I've searched the documentation, but I can't find out how to do 
> > this.
> >         Can this been done? And how? Thanks times infinity in advance for
> >         any help.
> > 
> >     >     Hi Bill,
> 
>     Would something like the following help?
> 
>     %%%%
>     \version "2.19.82"
> 
>     slash-over-note = #(lambda (grob)
>     (let* ((note (ly:note-head::print grob))
>     (x-extent (ly:stencil-extent note X))
>     (y-extent (ly:stencil-extent note Y))
>     (scaling (magstep (ly:grob-property grob 'font-size 0.0)))
>     (slash (ly:make-stencil (list 'draw-line 0.15 0 1.5 1.5 0) '(0
>     . 1.5) '(0 . 1.5)))
>     (transformed (ly:stencil-translate
>     (ly:stencil-scale (centered-stencil slash) scaling scaling)
>     (cons (interval-center x-extent) (interval-center
>     y-extent))))
>     (combined (ly:stencil-add note transformed)))
>     (ly:make-stencil (ly:stencil-expr combined) x-extent y-extent)))
> 
>     rhythms = \drummode { snare 4 8 8 2 }
>     \score { << \new DrumStaff { \rhythms
>     \override NoteHead.stencil = #slash-over-note \rhythms
>     \revert NoteHead.stencil \rhythms
>     } >> }
>     %%%%
> 
>     -- Aaron Hill_______________________________________________
>     lilypond-user mailing list
>     lilypond-user@gnu.org mailto:lilypond-user@gnu.org
>     https://lists.gnu.org/mailman/listinfo/lilypond-user
> 
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to