[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Using \tempo or multiple events in define-event-function
From: |
David Kastrup |
Subject: |
Re: Using \tempo or multiple events in define-event-function |
Date: |
Wed, 18 Apr 2012 15:31:15 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) |
Pavel Roskin <address@hidden> 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