Hello All,
Continuing my investigations here, with reference to the list archive:
I have tried making a custom articulation, rather than a text markup, and of course, all the alignment issues are solved. MWE below.
I will now transform my question. I have copied this code idea rather blindly with little understanding. Where is there any tutorial or reference information on extending lilypond to create new articulations?
Would a sampler like this be a good addition to LSR to help others out in the future?
Andrew
%=====
\version "2.19.82"
upbowMarkup =
\markup
\override #'(filled . #t)
\path #0.01
#'((moveto 0 1.3)
(lineto 0.25 1.3)
(lineto 0.57 0.46)
(lineto 0.9 1.3)
(lineto 1 1.3)
(lineto 0.5 0)
(lineto 0 1.3)
(closepath))
% define new articulation
#(append! default-script-alist
(list
`("upbow-acb"
. (
(text . ,#{ \markup \upbowMarkup #})
(stencil . ,ly:text-interface::print)
; any other properties
(toward-stem-shift-in-column . 0.0)
(padding . 0.30)
(avoid-slur . around)
;(script-priority . 100)
(direction . ,UP)
))))
upbowAcb = #(make-articulation "upbow-acb")
treble = {
\time 2/4
\override Stem.length = #18
\override StringNumber.script-priority = #4000
a''4^.\1\downbow
a8^.^\upbowAcb\2
s8
\override StringNumber.script-priority = #0
a''4\1\upbowAcb
a8^.\2\upbowAcb
s8
\bar "."
}
\score {
\new Staff { \treble }
\layout {}
}
%=====