[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Custom articulations/pitched single-note trills
From: |
Neil Puttock |
Subject: |
Re: Custom articulations/pitched single-note trills |
Date: |
Sun, 21 Dec 2008 19:11:40 +0000 |
Hello,
2008/12/21 gnomino <address@hidden>:
> I was wondering if there is a way to create custom articulations, which would
> solve both of my problems? If not, then how should I make the \trillFlats
> above
> appear in line with the \trills? I've tried adjusting #'padding,
> #'staff-padding, and #'minimum-space, none of which seem to have any effect.
The easy way is to override the stencil for Script objects:
\version "2.11.65"
trillFlatMarkup = \markup { \vcenter { \musicglyph #"scripts.trill"
\smaller \flat} }
trillFlat = {
\once \override Script #'stencil =
#(lambda (grob)
(grob-interpret-markup grob trillFlatMarkup))
}
\relative c' { \trillFlat c\trill c\trill \trillFlat c\trill c\trill }
A better way is to make an articulation, then use 'tweak to change its
properties, which means you don't have to use an override before the
articulation:
\version "2.11.65"
trillFlatMarkup = \markup { \vcenter { \musicglyph #"scripts.trill"
\smaller \flat } }
trillFlat =
#(let* ((music (make-articulation "trill"))
(trill-flat (lambda (grob)
(grob-interpret-markup
grob
trillFlatMarkup))))
(ly:music-set-property! music 'tweaks
(acons 'stencil trill-flat
(ly:music-property music 'tweaks)))
music)
\relative c' { c\trillFlat c\trill c\trillFlat c\trill }
Regards,
Neil