Hi Urs,
I went through this a couple of months ago, and it *seems* possible to use markups (and paths) as legitimately new articulations (maybe -- and happily -- in contradiction to the assumption in your original post, if I'm reading correctly).
Here's the pattern as a MWE:
%%% BEGIN NOVEL ARTICULATION USING MARKUP %%%
baca-damp-markup =
\markup
\scale #'(0.75 . 0.75)
\combine
\bold
\override #'(font-name . "Times") "O"
\path #0.15
#'(
(moveto -.4 .7)
(rlineto 2.4 0)
(closepath)
(moveto .8 -.5)
(rlineto 0 2.4)
)
#(append! default-script-alist
(list
`("bacadamp"
. (
(stencil . ,ly:text-interface::print)
(text . ,baca-damp-markup)
(avoid-slur . around)
(padding . 0.20)
(script-priority . 125)
(side-relative-direction . ,DOWN)
(skyline-horizontal-padding . 0.20)
;;(toward-stem-shift . 0.5)
))))
baca-damp = #(make-articulation "bacadamp")
\layout {
\context {
\Score
scriptDefinitions = #default-script-alist
}
}
%%% END %%%
You can then write ...
\new Staff { c'4 \baca-damp }
... and get ...
... as output.
To note:
1. Apologies for not yet crediting the various posts in the archives that made this possible; it was a weekend or two of reading through various breadcrumbs on the list that made the pattern possible.
2. The baca- prefix is a namespacing convention since I'm always mixing with modules in Python. Replace as necessary if the snippet works for you.
3. Wrt to your three initial criteria, the example above demonstrates #1 ("no postfix operator"). Because the symbol created is a legit script, overrides like "\override Script.staff-padding = 5" do work. So maybe this helps meet your #2 ("common vertical baseline"). I'm not certain about your #3 ("pushes notecolumns to obtain the necessary space"). But some testing seems to show that *if you explicitly specify the font of markup* then Lily can find a stencil (and move note columns).
%%% BEGIN WIDE EXAMPLE %%%
estr-markup =
\markup
\override #'(font-name . "Times")
"ESTREMAMENTE"
#(append! default-script-alist
(list
`("articestr"
. (
(stencil . ,ly:text-interface::print)
(text . ,estr-markup)
(avoid-slur . around)
(padding . 0.20)
(script-priority . 125)
(side-relative-direction . ,DOWN)
(skyline-horizontal-padding . 0.20)
;;(toward-stem-shift . 0.5)
))))
estr = #(make-articulation "articestr")
\layout {
\context {
\Score
scriptDefinitions = #default-script-alist
}
}
%%% END %%%
Then ...
\new Staff {
c'4
d'4
\estr
e'4
f'4
}
... gives ...
... as output.
Note that if you use "bald" markup (without a font override) Lily finds no stencil and produces no output for the articulation.
Trevor.