David Kastrup <d...@gnu.org> writes: > "H. S. Teoh" <hst...@quickfur.ath.cx> writes: > >> I have a Scheme function that returns a music expression. Unfortunately, >> the expression returned depends on the properties of the context it's >> evaluated in. I.e., based on the current setting of >> Staff.dynamicAbsoluteVolumeFunction it will return a different number of >> events in the music expression. >> >> Is this possible? > > \applyContext works at the process-music stage. That's actually a bit > late to generate stream events.
Sorry, that one is actually nonsense. I got confused between iterators (which is what \applyContext uses) and engravers here. So if you actually want to generate stream events, that would be possible and actually, for the sake of quoted music, a reasonably good idea. So you'd use ly:make-stream-event to create suitable stream events and broadcast them to the event-source dispatcher of the context... Weird. Nobody does that. Just C++ code. Now I'm irritated. -- David Kastrup _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user