lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: skylines and custom-code


From: Thomas Morley
Subject: Re: skylines and custom-code
Date: Thu, 8 Apr 2021 14:00:58 +0200

Am Mo., 5. Apr. 2021 um 12:00 Uhr schrieb Thomas Morley
<thomasmorley65@gmail.com>:

> { b'4\glissando 4 4 4 2 b'' }
>
> The plan is to print a glissando from b' to b'' and at intermediate
> NoteColumns print a Stem starting at the glissando line, i.e. the
> result will be a stemmed Glissando.
> (1) Obviously I need the intersection points of the y-axis of the
> Stems and the Glissando.
> I've coded an engraver to set the relevant pointers (from Stem to
> Glissando) and use some calculations to get them. This work is done.
> (2) Then I intend to move all NoteHeads of intermediate NoteColumns to
> sit on the glissando line, making them transparent (or point-stencil
> or omit the stencil)
> This would have the advantage that LilyPond could do the rest, i.e.
> print Stem, Beam, Script etc accordingly.
>
> Obviously the calculation of the intersection points needs to be done
> after the Glissando is printed, thus a simple override for
> NoteHead.Y-offset will not work, afaict.
> From description in the docs about unpure-pure-containers, this is a
> similar situation as for Beams and needed Stem lengths.
>
> Alas, I never came to grips with unpure-pure-containers. Granted, the
> explanations/descriptions in the docs improved over the years.
> Though, we don't have working coding-examples in the docs, "working"
> in the sense of "let me play with the code, testing what happens if I
> do this and that":
> The example in NR 5.5.6 works with and without unpure-pure-containers.
> The example (sort of) in CG 10.13.3 makes no sense to me, at least I
> found no situation where "bar" is called at all.
> The regtest unpure-pure-container.ly is probably ok as a regtest, it
> shows something is done, but why should a user do that at all. As a
> user I'd say, don't move the flag if you don't want a moved flag...
>
> That's it for the docs or did I overlook something?
>
> Unpure-pure-containers in LSR: zero
>
> Valentin's example works without unpure-pure-container as well.
>
> Thus, I'm at a loss, close to abandoning the work.

Ok, another 5 days passed working allday on the problem, progress: zero.
I give up.

Some insights:
(1)
It would have been helpful to understand how Stems fit into a Beam,
then I could use this knowledge to probably do similar with glissando
and Stems.
I was not able to figure it out.
(2)
Obviously the Stems needs to be positioned after Beam (or Glissando) is done.
An unpure-pure-container looked promising.
Though, I was not able to code even the simplest via native scheme.
This leads to the conclusion that unpure-pure-containers are not
accessible/customizable for users like me.
At least unless much more working examples are done in the docs.

Nevertheless, thanks Jean for his thoughts and ofcourse for his great
"Extending LilyPond".
https://extending-lilypond.readthedocs.io/en/latest/index.html

Cheers,
  Harm



reply via email to

[Prev in Thread] Current Thread [Next in Thread]