On 20.12.2015 01:50, Chris Yate wrote:
On 20 December 2015 at 00:41, Simon Albrecht <simon.albre...@mail.de
<mailto:simon.albre...@mail.de>> wrote:
On 20.12.2015 00 <tel:20.12.2015%2000>:45, Chris Yate wrote:
I can't get /alterBroken to work properly at all on control
points.
When I try the "tweak" version, that I assume would look like:
<code>
r4.
d,16-\alterBroken control-points #'(((0.0 . 0.0) (0 . 1.2) (0
. 1.2) (4 . 1)) ((0.0 . 0.0) (0 . 1.2) (0 . 1.2) (4 . 1))
((0 . 4.0) (0 . 3) (0 . 1) (0 . 0)) )
(f af cf af bf |
</code>
.... then the slur only appears as a small, and odd-shaped
squiggle by the first note d. Editing these control points is
a bit of hit and miss anyway, but I don't feel I understand
the syntax for \alterBroken well enough; there are too few
examples at present!
The big advantage of the shape command is that you can give
offsets for each control point against the default shape. The
control-points property however has every point coded relative to
the reference point for the entire slur (the note head of the
first note in the slur, I think), which often makes numbers very
high and trial and error very time-consuming.
The second argument to \alterBroken is a list. Each of its
elements will be applied to one of the segments of the broken
spanner. If you supply less entries than there are segments, the
remaining segments will not be tweaked.
HTH, Simon
I think I *half* understand what "shape" is doing, but I can't get
alterBroken to work for the control points. Can you give a working
example?
See attachment.
(I only half understand it, but I know the _two pairs_ of numbers at
_each_ end of a slur shape, which code for the bezier coordinates,
give the four sets of bracketed values. How the numbers work isn't a
complete mystery but I've not yet found a better way to determine them
than to keep plugging in numbers until it looks good, by iteration. A
graphical tool would be WONDERFUL ;-) ).
Of course: <http://sourceforge.net/p/testlilyissues/issues/2510/>
A really graphical tool is on the TODO list of the Frescobaldi devs also.
In the meantime: do you know shapeII from openlilylib? It’s not free
from bugs nor ready for inclusion into LilyPond proper, but it does
provide great utility for convenience in bézier tweaking. See
<https://github.com/openlilylib/snippets/tree/master/notation-snippets/shaping-bezier-curves>;
the example file provides extensive documentation.
Yours, Simon
\version "2.19.27"
test =
#(define-music-function (ev) (ly:music?)
(tweak 'color red ev))
{
c''-\test \> g'-\test \f
}
\version "2.19.32"
\paper { #(set-paper-size "a9") indent = 0 }
#(ly:set-option 'point-and-click #f)
\header { tagline = ##f }
{
\alterBroken control-points #'(
((0 . -2)(0 . 1)(4 . -1)(4 . 2))
((10 . 0)(12 . 0)(12 . 2)(10 . 2))
) Slur
1( \break
1)
}
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user