broadcasting override-events (was [Re: Edition Engraver bug?])

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

broadcasting override-events (was [Re: Edition Engraver bug?])

Jan-Peter Voigt
Hi David and all,

I stuck with successfully sending override-events from an engraver. I
created an example where I broadcast 3 events, one of them being an
override, but the override is not applied while the other 2 events are
processed as expected.
All events are sent using the same procedure. What might be the error in
this procedure. Is there something missing?

TIA
Jan-Peter


Am 05.03.2018 um 13:01 schrieb Jan-Peter Voigt:
> * I will refactor the EE to also broadcast overrides.


_______________________________________________
lilypond-devel mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-devel

broadcast-override.ly (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: broadcasting override-events (was [Re: Edition Engraver bug?])

David Kastrup
Jan-Peter Voigt <[hidden email]> writes:

> Hi David and all,
>
> I [am] stuck with successfully sending override-events from an
> engraver. I created an example where I broadcast 3 events, one of them
> being an override, but the override is not applied while the other 2
> events are processed as expected.  All events are sent using the same
> procedure. What might be the error in this procedure. Is there
> something missing?

>      (ly:broadcast (ly:context-event-source context) ; broadcast to this context
>        (ly:make-stream-event
>         (ly:assoc-get 'types evcls '()) ; get event class from attributes
>         (ly:music-mutable-properties music)) ; get properties for this music-event
>        )

Well, here is your mistake.  The context modifying stream events are
_completely_ different from their originating music expressions.  Most
stream events are converted directly from music expressions in the
manner you do it here.

However, the stream events for modifying context properties are
generated by separate iterators and are basically ad-hoc (this seems
weirder these days than it may have been in the grey mists of time since
in olden times it was the responsibility of the iterator to implement
"\\once", something that it could not actually reliably do).

Check the source code in lily/property-iterator.cc to see what to
generate here for the various events (Push/Pop correspond to
override/revert).

--
David Kastrup

_______________________________________________
lilypond-devel mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-devel
Reply | Threaded
Open this post in threaded view
|

Re: broadcasting override-events (was [Re: Edition Engraver bug?])

Jan-Peter Voigt
Am 07.03.2018 um 11:25 schrieb David Kastrup:
> Check the source code in lily/property-iterator.cc to see what to
> generate here for the various events (Push/Pop correspond to
> override/revert).

Thank you David! This allows me to refactor the code.

Jan-Peter

_______________________________________________
lilypond-devel mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-devel
Reply | Threaded
Open this post in threaded view
|

Re: broadcasting override-events (was [Re: Edition Engraver bug?])

David Kastrup
Jan-Peter Voigt <[hidden email]> writes:

> Am 07.03.2018 um 11:25 schrieb David Kastrup:
>> Check the source code in lily/property-iterator.cc to see what to
>> generate here for the various events (Push/Pop correspond to
>> override/revert).
>
> Thank you David! This allows me to refactor the code.

Actually, Push/Pop correspond to "temporary override/revert".  A normal
override is translated into Pop+Push in sequence if I remember
correctly.

--
David Kastrup

_______________________________________________
lilypond-devel mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-devel
Reply | Threaded
Open this post in threaded view
|

Re: broadcasting override-events (was [Re: Edition Engraver bug?])

Jan-Peter Voigt
Am 07.03.2018 um 15:30 schrieb David Kastrup:

> Jan-Peter Voigt <[hidden email]> writes:
>
>> Am 07.03.2018 um 11:25 schrieb David Kastrup:
>>> Check the source code in lily/property-iterator.cc to see what to
>>> generate here for the various events (Push/Pop correspond to
>>> override/revert).
>>
>> Thank you David! This allows me to refactor the code.
>
> Actually, Push/Pop correspond to "temporary override/revert".  A normal
> override is translated into Pop+Push in sequence if I remember
> correctly.
>
yep, and I will repair the handling of _not_ \temporary \overrides.
Right now EE handles all overrides as temporary.

_______________________________________________
lilypond-devel mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-devel