|
From: | Jean Abou Samra |
Subject: | Re: avoid alignment of hairpin and dynamic text |
Date: | Mon, 1 Feb 2021 17:42:46 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 |
Le 31/01/2021 à 11:09, Werner LEMBERG a écrit :
At least I have not found a way to fix it easily :-(To answer my own question: No, it can't be fixed as outlined above. Reason is that the order of events at a given moment is not specified. This means that it is not possible to make a reliable distinction between \f \< ... \breakDynamicSpan \p \< ... \f and \f \< ... \p \breakDynamicSpan \< ... \f However, I could imagine that a property `no-dynamic-span` gets added to the `DynamicText` grob. The `Dynamic_align_engraver` checks this while creating a `DynamicLineSpanner` grob; if set, the `DynamicText` grob is not added as a child to `DynamicLineSpanner`.
Hi Werner,
Are you sure about the order of events not being
guaranteed? I am surprised; I had inferred the
contrary from
http://lilypond.org/doc/v2.22/Documentation/contributor/articulations-on-eventchord
specifically the last sentence:
[...] (except in cases where the order of events matters).
And if I write:
\new Voice \with {
\consists
#(lambda (context)
(define (db event)
(ly:message "~s"
(ly:music-property
(ly:event-property event 'music-cause)
'name)))
(make-engraver
(listeners
((absolute-dynamic-event engraver event)
(db event))
((span-dynamic-event engraver event)
(db event))
((break-dynamic-span-event engraver event)
(db event)))))
}
%\displayMusic
{
c'1\f\<
c'\p\breakDynamicSpan\<
c'\f\<
c'\breakDynamicSpan\p
}
I do see the events happening in the right order:
AbsoluteDynamicEvent
CrescendoEvent
AbsoluteDynamicEvent
BreakDynamicSpanEvent
CrescendoEvent
AbsoluteDynamicEvent
CrescendoEvent
BreakDynamicSpanEvent
AbsoluteDynamicEvent
Not that this is a proof of it being true in general.
It would be nice to figure this out.
Thanks,
Jean
[Prev in Thread] | Current Thread | [Next in Thread] |