Pavel Roskin <pro...@gnu.org> writes:

> Hello!
>
> I cannot use define-event-function for tempo changes.  That's what I'm
> trying to do:
>
> \version "2.15.36"
> rit = #(define-event-function (parser location) () #{
>   ^"rit." \tempo 4=40
> #})
> \new Voice { \tempo 4=50 c'4 e'4 \rit g'2 }
>
> I get an error:
>
> event.ly:3:10: error: syntax error, unexpected \tempo, expecting $end
>   ^"rit." 
>           \tempo 4=40
> event.ly:5:38: error: error in #{ ... #}
> \new Voice { \tempo 4=50 c'4 e'4 \rit 
>                                       g'2 }

Yup.  define-event-function can only be used to return _one_ postevent.

> There is an additional problem with \tempo.  It returns a value
> that causes an error:
>
> \version "2.15.36"
> rit = #(define-event-function (parser location) () #{
>   \tempo 4=40
> #})
> \new Voice { \tempo 4=50 c'4 e'4 \rit g'2 }

\tempo is not a postevent.  You can try selling it as one by writing
#{ -\tempo ... #}
but I don't know whether that will actually work.

-- 
David Kastrup


_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to