Hi, 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? The background of this is that I'm writing a Scheme function that generates single-note crescendos by emitting a series of \set Staff.midiExpression = ... events. Currently I've written a Scheme function that's able to generate these events; however, it requires me to specify numerical starting / ending values for midiExpression. I'd like to be able to specify dynamics instead of numerical values, and have the Scheme function automatically look up the numerical values based on the current volume function defined for the Staff. However, so far I haven't been able to figure out how to read the Staff properties except using \applyContext with a lambda, and AFAICT it's not possible to return a music expression from this lambda? Or is there another (hopefully simpler?) way to achieve what I want? --T _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user