Hi David,
2014-04-12 16:21 GMT+02:00 David Nalesnik <[email protected]>:
[...]
> Forgive the late reply...
No problem. :)
Meanwhile I've found a solution myself, though, your coding below is
much more elegant.
>
> What about something like this?
>
> \version "2.19.3"
>
>
> info =
>
> \override Staff.AccidentalPlacement #'after-line-breaking =
>
> #(lambda (grob)
>
> (let* ((accs (map cadr (ly:grob-object grob 'accidental-grobs)))
>
> (sys (ly:grob-system grob))
>
> (X-exts (map (lambda (x) (ly:grob-extent x sys X)) accs))
>
> (un (reduce interval-union '() X-exts)))
>
> (display (interval-length un))
>
> (newline)))
>
>
> \relative c' {
>
> \info
>
> <c d>
>
> <cis d>1
>
> <cis dis>
>
> <cis dis eis>
>
> <cis dis eis fis>
>
> <cis dis eis fis gis>
>
> }
One question remains: why was it changed?
Instead of more or less simply calling the vallue via ly:grob-extent
we now have to calculate it, looking at each Accidental separately.
(via map and reduce)
Just curious.
I must have missed that change.
Thanks,
Harm
_______________________________________________
bug-lilypond mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-lilypond