lilypond-user
[Top][All Lists]
Advanced

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

vibesDamper - auto position "X" glyph next to note


From: Pedro Pessoa
Subject: vibesDamper - auto position "X" glyph next to note
Date: Tue, 30 Oct 2018 20:26:01 -0700 (MST)

Hello,
With more trial and error than wisdom, I've managed to create a function to
attach an X to a note and tweak its position % \vibesDamper #'(0 . 0) note
%. This X between notes is a dampening notation for vibraphone. I'm really
happy with it, since I shall use it a lot.

One improvment I can think of now is to have it auto aligned with the note's
body (like, in the middle of the stem) and have the position tweak as an
optional parameter. How complex is this task? I feel I need some directions.

Here is my working script (which probably can be better written)

%%%

vibesDampX =
#(define-music-function (note) (ly:music?)
   (set! (ly:music-property note 'articulations)
         (cons
          (make-music
           'TextScriptEvent
           'direction 1
           'text
           (markup
            #:line
            (#:musicglyph "noteheads.s2cross")))
          (ly:music-property note 'articulations)
          ))note )

vibesDamper=
#(define-music-function (offset note) (pair? ly:music?)
   #{
     \once \override TextScript.extra-offset = #offset
     \vibesDampX #note
   #})

%%%



--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html



reply via email to

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