[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: DurationLine avoiding RehearsalMarks
From: |
Thomas Morley |
Subject: |
Re: DurationLine avoiding RehearsalMarks |
Date: |
Mon, 11 Apr 2022 17:20:28 +0200 |
Am Mo., 11. Apr. 2022 um 12:40 Uhr schrieb Jean Abou Samra <jean@abou-samra.fr>:
>
> Le 11/04/2022 à 10:30, Thomas Morley a écrit :
> > Hi Mark,
> > DurationLine is designed not to be printed if breakable items at
> > line-end/start are present, like Clef, KeySignature etc.
> > I wasn't aware RehearsalMark is ofcourse one of them.
> > Currently I'm preparing a patch to disregard RehearsalMark.
> > Is your use-case urgent?
>
>
> Well, the same problem exists for breakable items in another staff
> than the one where the DurationLine is being printed.
>
>
> \version "2.23.7"
>
> \layout {
> \context {
> \Voice
> \consists Duration_line_engraver
> }
> }
>
> <<
> \new Staff { c'1\- \break s1 c'1 }
> \new Staff { s1 \key cis \major s1 s1 }
> >>
Well, your example prints as I would wish it should.
Alas, there are obviously different opinions. Look at:
\layout {
\context {
\Voice
\consists Duration_line_engraver
}
}
<<
\new Staff {
\override Glissando.breakable = ##t
c'1(\-\startTextSpan\glissando \break s1 c''1)\stopTextSpan
}
\new Staff { s1 \key cis \major s1 s1 }
>>
Not all spanners start/end equal.
Imho, it's a mess which needs design decisions.
> How about adding a Scheme interface for Axis_group_interface::staff_extent
> from lily/axis-group-interface.cc and using it in duration-line::print?
Please remember I don't know C++, thus I don't fully understand what's
done in lily/axis-group-interface.cc, same for the porting to scheme.
Maybe some comments would help.
Obviously grob::has-in-ancestry? is a predicate. It becomes #t if
`potential-ancestor' (the StaffSymbol we're in?) is found.
(Btw, in the recursion "?" is missing)
> It essentially does the same as (untested code):
>
> #(define (grob::has-in-ancestry? grob potential-ancestor axis)
> (or (eq? grob potential-ancestor)
> (let ((parent (ly:grob-parent grob axis)))
> (and (not (null? parent))
> (grob::has-in-ancestry parent potential-ancestor axis)))))
Though, what's below? I've difficulties with the arguments.
`axis-group' is likely the VerticalAxesGroup: (ly:grob-object grob
'axis-group-parent-Y) ?
`refpoint' is (ly:grob-system grob) ?
`staff' is (ly:grob-object grob 'staff-symbol) ?
What are `ext-axis' and `parent-axis' meant for?
> #(define (axis-group-interface::staff-extent axis-group refpoint
> ext-axis staff parent-axis)
> (ly:relative-group-extent
> (filter
> (lambda (elt)
> (grob::has-in-ancestry? elt staff parent-axis))
> (ly:grob-array->list (ly:grob-object axis-group 'elements)))
> refpoint
> ext-axis))
For now I was not able `axis-group-interface::staff-extent' reasonably.
Thanks,
Harm
- DurationLine avoiding RehearsalMarks, Mark Knoop, 2022/04/10
- Re: DurationLine avoiding RehearsalMarks, Mark Knoop, 2022/04/11
- Re: DurationLine avoiding RehearsalMarks, Thomas Morley, 2022/04/11
- Re: DurationLine avoiding RehearsalMarks, Mark Knoop, 2022/04/11
- Re: DurationLine avoiding RehearsalMarks, Thomas Morley, 2022/04/11
- Re: DurationLine avoiding RehearsalMarks, Mark Knoop, 2022/04/11
- Re: DurationLine avoiding RehearsalMarks, Thomas Morley, 2022/04/16
- Re: DurationLine avoiding RehearsalMarks, Mark Knoop, 2022/04/17
- Re: DurationLine avoiding RehearsalMarks, Jean Abou Samra, 2022/04/11
- Re: DurationLine avoiding RehearsalMarks,
Thomas Morley <=
- Re: DurationLine avoiding RehearsalMarks, Jean Abou Samra, 2022/04/11
- Re: DurationLine avoiding RehearsalMarks, Thomas Morley, 2022/04/12
- Re: DurationLine avoiding RehearsalMarks, Jean Abou Samra, 2022/04/12
- Re: DurationLine avoiding RehearsalMarks, Thomas Morley, 2022/04/13
- Re: DurationLine avoiding RehearsalMarks, Jean Abou Samra, 2022/04/13
- Re: DurationLine avoiding RehearsalMarks, Jean Abou Samra, 2022/04/13
- Re: DurationLine avoiding RehearsalMarks, Thomas Morley, 2022/04/15
- Re: DurationLine avoiding RehearsalMarks, Jean Abou Samra, 2022/04/15
- Re: DurationLine avoiding RehearsalMarks, Thomas Morley, 2022/04/15
- Re: DurationLine avoiding RehearsalMarks, Jean Abou Samra, 2022/04/15