Hi Andrew,
Am 21.02.19 um 05:08 schrieb Andrew Bernard:
Hello All,
Continuing my investigations here, with reference to the list archive:
https://lists.gnu.org/archive/html/lilypond-user/2015-04/msg00118.html
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?
This is exactly what I was thinking yesterday after arriving at the
point that my problem was solved. Adding custom articulations is a
pretty obscure technique (I mean, you "hijack" one of LilyPond's
built-in data structures) but I think a valid one that should be made
available.
I didn't feel up to writing a tutorial yet because there are too many
grey areas wrt my current level of knowledge. But we could commit to
writing a tutorial post together, which would give the context and the
opportunity to sort these things out.
What do you think?
Best
Urs
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 {}
}
%=====
On Thu, 21 Feb 2019 at 14:32, Andrew Bernard <andrew.bern...@gmail.com
<mailto:andrew.bern...@gmail.com>> wrote:
Is my problem that this is a markup and not a proper articulation?
_______________________________________________
lilypond-user mailing list
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