[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Get the positions of a beam (or other grob with positions)
From: |
Urs Liska |
Subject: |
Get the positions of a beam (or other grob with positions) |
Date: |
Thu, 17 May 2012 12:08:26 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:12.0) Gecko/20120430 Thunderbird/12.0.1 |
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
- Get the positions of a beam (or other grob with positions),
Urs Liska <=
- Re: Get the positions of a beam (or other grob with positions), David Nalesnik, 2012/05/17
- Re: Get the positions of a beam (or other grob with positions), Janek Warchoł, 2012/05/19
- Re: Get the positions of a beam (or other grob with positions), David Nalesnik, 2012/05/19
- Re: Get the positions of a beam (or other grob with positions), Janek Warchoł, 2012/05/19
- Re: Get the positions of a beam (or other grob with positions), Janek Warchoł, 2012/05/23
- Re: Get the positions of a beam (or other grob with positions), David Kastrup, 2012/05/23
- Re: Get the positions of a beam (or other grob with positions), Janek Warchoł, 2012/05/23
- Re: Get the positions of a beam (or other grob with positions), Thomas Morley, 2012/05/23
- Re: Get the positions of a beam (or other grob with positions), Janek Warchoł, 2012/05/23
- Re: Get the positions of a beam (or other grob with positions), David Kastrup, 2012/05/23