Aaron Hill <lilyp...@hillvisions.com> writes: > NOTE: I know that \bendAfter currently does not support all of the > usages below; this all is coming from my investigation into how to > enable such support. My plan is to create a patched version of the > engraver in Scheme as a proof-of-concept; and if it works, I can port > the results back to C++ and submit a patch to the project. But I have > hit an unexpected stumbling block... > > Please consider the following: > > %%%% > \version "2.19.82" > > debug_bend_engraver = #(make-engraver > (listeners > ((bend-after-event engraver event) > (format (current-error-port) > "\ndebug_bend_engraver: bend-after-event during ~a at ~a" > (ly:context-current-moment (ly:translator-context engraver)) > (ly:prob-property (ly:event-property event 'music-cause) > 'origin))))) > > \layout { > \context { > \Voice > \consists \debug_bend_engraver > } > } > > \fixed g' { > g \bendAfter #-4 d2. > <g b>4 \bendAfter #-4 d2. > <g \bendAfter #-4 b>4 d2. > << { g4 \bendAfter #-4 } { b4 } >> d2. > } > %%%% > > I would expect the above to print out a debug line per each > bend-after-event. But oddly the third--the one attached to a note > within a chord--seems to go missing. > > Adding in a \displayMusic doesn't really show anything different about > the third usage of \bendAfter. Just like the first and fourth > occurrences, the bend-after-event is part of the articulations for the > corresponding note-events. (The second instance is unique in that the > event is simply stored at the end of the chord's elements.) > > It is my understanding that the event-chord-iterator handles > broadcasting all of the chord's elements, and then the > rhythmic-music-iterator will take care of broadcasting the > articulations for the note-events. But that does not seem to be > happening. > > Where have I gone wrong in my thinking?
_Either_ the Event_chord_iterator _or_ the Rhythmic_music_iterator are doing the broadcasting of note events, depending on whether the notes are within a chord or not. _Only_ the Rhythmic_music_iterator broadcasts articulations, so they are _only_ removed and broadcast for non-chord notes, and actually only if there is a listener for them, otherwise they are kept on the rhythmic event like articulations on chord notes _always_ are. If you want to do anything with chord note articulations, you have to listen for the chord notes and look at their articulations property. -- David Kastrup _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user