Hi all, I'm trying to apply event functions to music passed into a music function like that:
\version "2.19.57" test = #(define-music-function (mus)(ly:music?) #{ #mus \startGroup #}) { \test c' d' e' f' \stopGroup } (of course this is not what I ultimately want to achieve, but the nucleus from which I'll be able to continue on my own). This fails with "error: syntax error, unexpected EVENT_IDENTIFIER". I think it is because the #mus expression is somehow already complete (differently from when used in regular input) and I have to somehow *apply* the \startGroup event function to the #mus argument. >From \displayMusic I can see that it is added as a NoteGroupingEvent to the note's articulations, but I'd like to ask if there's a more straightforward way to attach the event to the music than rebuilding the music expression in Scheme. OTOH I will want to do that for the first *and last* element in a music expression (in order to apply the start and stop command to a sequence of notes), so I may *have* to extract the Scheme representation anyway? TIA Urs -- u...@openlilylib.org https://openlilylib.org http://lilypondblog.org
_______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user