lilypond-user
[Top][All Lists]

## Re: Spannerize glyphs, markups etc. ?

 From: Pierre Perol-Schneider Subject: Re: Spannerize glyphs, markups etc. ? Date: Thu, 4 Feb 2021 08:34:58 +0100

Hi Dimitris,
Here's a trial (every adjsutment are manual):

%%
\version "2.22.0"

curl =
\markup
\stencil
#(make-path-stencil
'(M 0 0 C 4 0 4 5 2.5 5 C 1 5 1 0 5 0)
.15 .6 .6 #f)

mors =
\markup
\stencil
#(make-path-stencil
'(M 0 0 L .5 0 M 1.5 0 L 3 0)
.15 .6 .6 #f)

\layout { ragged-right = ##f }

{
a4 -\tweak extra-offset #'(.5 . 3)
-\markup {
\with-dimensions-from\null
\rotate #25
\pattern #7 #X #0 \curl
}
a'''
a -\tweak extra-offset #'(1 . 3.5)
-\markup {
\with-dimensions-from\null
\rotate #25
\pattern #9 #X #.5 \mors
}
a'''
}
%%

Cheers,
Pierre

Le jeu. 4 févr. 2021 à 02:43, Dimitris Marinakis <dtsmarin02@gmail.com> a écrit :
Does anyone have any code that allows us to "spannerize" repeated or alternating paths and musicglyphs ?
e.g. - • - • - • -  or even asymmetric patterns like - - • - > - •
I think an effort for such a code would also be really useful for evolving spanners. (trills with various speeds etc.)

If I'm not mistaken, the trill spanner is made from concatenated individual glyphs so at least the basic repeated symbol seems easier to achieve.

It would be really cool having a flexible solution that works like this:
\evolvingspanner
arg1 left text (trill symbol etc.)
arg2 how many of the 1st symbol
arg3 how many of the 2nd symbol
.... ? manually enter how many glyphs are needed or perhaps a more automatic way to divide the spanner into segments and then just specify how many segments and glyphs will be used
arg4 right text (end cap)

-------
\repeatspanner
arguments that specify the type of pattern and how many symbols are used

I understand this could get really complicated so I tried to keep it fairly modest.