[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problems with horizontal brackets
From: |
Thomas Morley |
Subject: |
Re: Problems with horizontal brackets |
Date: |
Sun, 31 May 2020 14:59:03 +0200 |
Am So., 31. Mai 2020 um 06:35 Uhr schrieb Jon Arnold
<jonarnoldsemail@gmail.com>:
>
> Hi-
> I'm using horizontal brackets to analyze a piece that makes heavy use of
> the completion engravers, and I've discovered that the brackets do not
> extend the full length of a note when tied over a bar. The bracket only
> goes as far as the beginning of the expanded value.
>
> Perhaps the last bit should be filed separately, but the brackets do not
> appear at all when using full measure rests.
>
> Here's my example:
>
> %horizontal brackets do not extend the full length of the note
> %if used on a note expanded by completion engravers
>
> %they also do not appear at all on full measure rests
>
> \version "2.21.1"
>
> \score {
> \new Staff {
> a1-\startGroup c'\breve-\stopGroup \break
> r1-\startGroup r\breve-\stopGroup \break
> R1-\startGroup R\breve-\stopGroup
> }
> \layout {
> \context {
> \Voice
> \remove "Note_heads_engraver"
> \consists "Completion_heads_engraver"
> \remove "Rest_engraver"
> \consists "Completion_rest_engraver"
> \consists "Horizontal_bracket_engraver"
> }
> }
> }
> _______________________________________________
> bug-lilypond mailing list
> bug-lilypond@gnu.org
> https://lists.gnu.org/mailman/listinfo/bug-lilypond
Hi Jon,
thanks for your report.
If I understand correctly, the Horizontal_bracket_engraver works
before Completion_heads/rest_engraver.
Furthermore Horizontal_bracket_engraver works with NoteColumns only.
Thus MultiMeasureRests (MMRs) are not taken into account. Same holds
for skip-events.
I can't provide a proper fix.
Though, below a workaround using David's \at, in case of MMRs an ugly
workaround...
\version "2.20.0"
at =
#(define-music-function (time event music)
(ly:duration? ly:music? ly:music?)
"Place @var{event} at a relative duration @var{time} in relation
to @var{music}."
#{ \context Bottom << { \skip $time <>$event } $music >> #})
\score {
\new Staff {
a1-\startGroup \at 1 \stopGroup c'\breve \break
r1-\startGroup \at 1 \stopGroup r\breve \break
%% fine-tuning HorizontalBracket
\override HorizontalBracket.shorten-pair = #'(-0.5 . 1)
\omit Rest
\at 4 r4-\startGroup R1 \at 1. r4-\stopGroup R\breve
\undo \omit Rest
}
\layout {
\context {
\Voice
\consists "Horizontal_bracket_engraver"
\remove "Note_heads_engraver"
\consists "Completion_heads_engraver"
\remove "Rest_engraver"
\consists "Completion_rest_engraver"
}
}
}
HTH a bit,
Harm