Hi,
I am very much enjoying now to tweak slurs and other curves using
offsets instead of hardcoded control-points.
I wonder if it would be interesting to have a similar approach to grobs
with a positions property (e.g. beams).
While it is comparably easy to find usable #'positions for a beam this
is then of course hard-coded and won't work if either the system-system
spacing changes for whatever reason, or the music is transposed.
Of course it must be quite straightforward to read out lilypond's
decision and apply offsets to that in a music function?
And if that works one could even enhance the \shape function?
The wrapper function could check against a list of grob names and call
the appropriate helper function (i.e. if its a Slur then call shape-curve).
Maybe it's even possible to make that still more generic. Is it possible
to check if a given grob has a given property? (i.e. if the grob has a
control-points property then call shape-curve, else if it has positions
then call shape-positions [elseif used so that a slurs control-points
take precedence over its positions]).
So it could be possible to write
shape Slur #'((1 . 0) (3 . -2) (0 . 0) (0 . 1))
or
shape Beam #'(2 . -1)
or
shape Arpeggio #'(-1 . 2)
Would be awesome I think.
Maybe one could even have more ideas to make this offset approach even
more general/generic.
Instead of ready-made functions, I would also appreciate hints on how to
achieve this (as said, I'm quite interested in getting used to write
Scheme functions myself, without always having to ask here).
Best
Urs
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user