lilypond-user
[Top][All Lists]
Advanced

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

Re: Barre grob - appearance


From: Thomas Morley
Subject: Re: Barre grob - appearance
Date: Tue, 30 Aug 2022 21:57:12 +0200

Am Mo., 29. Aug. 2022 um 23:24 Uhr schrieb Jean Abou Samra <jean@abou-samra.fr>:
>
> Le 27/08/2022 à 13:55, Thomas Morley a écrit :
> > I foresee some hard to solve problems, though. I'm currently not sure
> > about the success.
>
>
> IUUC, you have a problem to draw the grob with both a vertical and a
> horizontal
> line, because the usual way to make the vertical line place itself
> against the
> notes with some padding would be Y-offset =
> side-position-interface::y-aligned-side,
> but this requires the Y-extent + vertical-skylines, and those depend on
> the full
> stencil, and the vertical part of the line depends on the Y-offset, so
> you have
> a cyclic dependency.

Yeah...

>
> Tricky, yes. OTOH, would it work to have two separate grobs, one for the
> horizontal
> line and one for the vertical one? Say,
>
> BarreVerticalLine
>
>    - an Item
>    - has 'horizontal-line pointer to a BarreHorizontalLine
>    - stencil = a function that takes the coordinate of the
>      'horizontal-line, and draws a vertical line up to that
>      height
>    - X-extent = a function that essentially does
>
>        (symmetric-interval thickness)
>
>      (it can't be computed from the stencil, since as BarreVerticalLine
>       is an Item its X-extent will be asked for before line breaking)
>
>    - Y-extent = an unpure-pure container (ask me for details if
>      needed)
>
> BarreHorizontalLine
>
>    - a Spanner
>    - has horizontal-line-spanner-interface, uses it for bound-details.
>      Uses ly:line-spanner::print for stencil. This is all quite similar
>      to TextSpanner.
>
> Just in case that helps.
>
> Jean
>
>

Ofcourse this helps! Not that I have understood all parts yet...and
it's already about step (3) Coding

Up to now I only tried to collect all varieties of possible
barré-signs, i.e. step (1)

For step, (2) Requirements, I think about what should be tweakable:
- horizontal line (y/n), with hook (y/n)
- vertical line (y/n), with hook (y/n)
- bottom end of the vertical line must be settable
- make multiple barré per chord possible
- line-style(s): solid/dashes/dotted/none
- script-priority for horizontal and vertical line, this value may be
different (not sure about it yet)
- which defaults for text (italic?, arabic/roman numbers? etc)

So far my current thoughts, with no warranties for completeness (did I
miss something?).


Best,
  Harm



reply via email to

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