Re: How to detect SpanBar from inside a make-bar-line definition?
Am Sa., 16. März 2024 um 14:59 Uhr schrieb Thomas Morley : > > Am Do., 14. März 2024 um 02:31 Uhr schrieb Dan Eble > : > > > > On 2024-03-13 20:09, Thomas Morley wrote: > > > I don't understand what you propose. > > > > My advice was general software-design advice based on a hasty > > consideration of your post, so I'm not really surprised. > > > > > To give a different example, let's look at make-dotted-bar-line (afaik > > > it's your code). > > > There you have a `making-span-bar?'-condition, obviously you want a > > > span bar a little different than bar line. > > > > Yes, I remember that there were cases where the dashes didn't meet well, > > but I don't remember the details. > > > > > a) If I implement (pretty-print grob) there, I always get BarLine, > > > never something else, regardless where I place that. > > > > In that case, I think you will need to pass more information into the > > function from above or find a heuristic that works better. > > > > > c) the condition itself may fail, see > > > /input/regression/non-centered-bar-lines.ly for an example, or try to > > > set bar-extent to an interval not crossing zero. > > > > That's why the comments call it a heuristic. > > > > > Because of b) I tried to patch make-dotted-bar-line, alas I found no > > > condition to apply the patched functionality to span bars only. > > > > > > Thus I ask if there is such a condition at all. Or how it could be coded. > > > > I'm not sure, and I have to be very motivated to read Scheme, which I am > > not at the moment. Sorry. > > -- > > Dan > > I now tried for weeks to find a better heuristic or condition. To no avail. > > Then I introduced a new grob-property, 'is-span-bar and have set it in > `span-bar::compound-bar-line'. > Now regtests are always failing with ununderstandable messages: > programming error: Grob `VoltaBracket' has no interface for property > `is-span-bar' > programming error: Grob `System' has no interface for property > `in-note-padding' > I neither tackled VoltaBracket nor System... > > Nevertheless I uploaded the branch (maybe someone wants to have a look): > https://gitlab.com/lilypond/lilypond/-/merge_requests/2274 > Not surprisingly the pipeline fails, with completely other messages, though. > > Currently I think I'll give up on improving dashed/dotted span bar. > Uploading soon a patch only adjusting for other staff-spaces. > > Thanks, > Harm I think (hope) I found the culprit. Don't set the property in `span-bar::compound-bar-line', but in `ly:span-bar::print' for `model-bar' Cheers, Harm
Re: How to detect SpanBar from inside a make-bar-line definition?
Am Do., 14. März 2024 um 02:31 Uhr schrieb Dan Eble : > > On 2024-03-13 20:09, Thomas Morley wrote: > > I don't understand what you propose. > > My advice was general software-design advice based on a hasty > consideration of your post, so I'm not really surprised. > > > To give a different example, let's look at make-dotted-bar-line (afaik > > it's your code). > > There you have a `making-span-bar?'-condition, obviously you want a > > span bar a little different than bar line. > > Yes, I remember that there were cases where the dashes didn't meet well, > but I don't remember the details. > > > a) If I implement (pretty-print grob) there, I always get BarLine, > > never something else, regardless where I place that. > > In that case, I think you will need to pass more information into the > function from above or find a heuristic that works better. > > > c) the condition itself may fail, see > > /input/regression/non-centered-bar-lines.ly for an example, or try to > > set bar-extent to an interval not crossing zero. > > That's why the comments call it a heuristic. > > > Because of b) I tried to patch make-dotted-bar-line, alas I found no > > condition to apply the patched functionality to span bars only. > > > > Thus I ask if there is such a condition at all. Or how it could be coded. > > I'm not sure, and I have to be very motivated to read Scheme, which I am > not at the moment. Sorry. > -- > Dan I now tried for weeks to find a better heuristic or condition. To no avail. Then I introduced a new grob-property, 'is-span-bar and have set it in `span-bar::compound-bar-line'. Now regtests are always failing with ununderstandable messages: programming error: Grob `VoltaBracket' has no interface for property `is-span-bar' programming error: Grob `System' has no interface for property `in-note-padding' I neither tackled VoltaBracket nor System... Nevertheless I uploaded the branch (maybe someone wants to have a look): https://gitlab.com/lilypond/lilypond/-/merge_requests/2274 Not surprisingly the pipeline fails, with completely other messages, though. Currently I think I'll give up on improving dashed/dotted span bar. Uploading soon a patch only adjusting for other staff-spaces. Thanks, Harm
Re: strange `break-align-symbols` behaviour
>> there is no key signature at this point, right? > > This is my interpretation: the key signature is removed by > break-visibility, but the X alignment of a mark is computed before > that happens. Thanks. If your interpretation is correct I consider it as problematic, since it is not possible to control the alignment of the `MetronomeMark` grob as intended. In particular, specifying `key-signature` in `break-align-symbols` effectively disables the `non-break-align-symbols` property. To demonstrate this please have a look at the following example; the first line is the default as specified in `define-grobs.scm`. Werner == \version "2.25.14" music = { \compressEmptyMeasures R1*20 \tempo "Tempo" R1*20 \tempo "Tempo" \key b\minor R1*20 \tempo "Tempo" g'1 R1 } \markup \larger \larger "MetronomeMark" \markup \vspace #1 \markup "(break-align-symbols . (time-signature))" \markup "(non-break-align-symbols . (paper-column-interface))" { \override Score.MetronomeMark.break-align-symbols = #'(time-signature) \override Score.MetronomeMark.non-break-align-symbols = #'(paper-column-interface) \music } \markup "(break-align-symbols . (key-signature))" \markup "(non-break-align-symbols . (paper-column-interface))" { \override Score.MetronomeMark.break-align-symbols = #'(key-signature) \override Score.MetronomeMark.non-break-align-symbols = #'(paper-column-interface) \music } \markup "(break-align-symbols . (time-signature))" \markup "(non-break-align-symbols . (note-column-interface multi-measure-rest-interface))" { \override Score.MetronomeMark.break-align-symbols = #'(time-signature) \override Score.MetronomeMark.non-break-align-symbols = #'(note-column-interface multi-measure-rest-interface) \music } \markup "(break-align-symbols . (key-signature))" \markup "(non-break-align-symbols . (note-column-interface multi-measure-rest-interface))" { \override Score.MetronomeMark.break-align-symbols = #'(key-signature) \override Score.MetronomeMark.non-break-align-symbols = #'(note-column-interface multi-measure-rest-interface) \music }