lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

music function semantics


From: David Kastrup
Subject: music function semantics
Date: Tue, 26 Jul 2011 23:41:49 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Hi,

I am currently stuck in rethinking what music functions should be able
to do.

Actually, the point is more that I am _tracing_ that, and the current
state is just scary in its inconsistency, which is only alleviated by
being pretty much undocumented.

So I am not sure which of the undocumented "features" is actually being
used.

Currently music functions can occur in three places.  Basically
standalone as prefix_composite_music, inside of a chord as
music_function_chord_body, and as an event modifier as
music_function_event.  prefix_composite_music may take an arbitrary
number of ly:music? arguments, but music_function_chord_body and
music_function_event may only have the last argument be a music event,
and then music_function_chord_body will get the next chord body event as
last argument, and music_function_event will get the following music
event attached to the current event.

So if we define a music function taking just one music expression as
argument, it may end up in any of the three places, getting different
music types as argument, and being allowed to return different music
types depending on where it is used.  Total mess syntactically.  If we
want to turn something like \transpose into a music function, it is not
likely we want to have it accepted in all of those places.  And we
probably won't care for the error messages we get when it is used on a
postevent.

So the question basically is: which of those mechanisms is actually
being in use?  Are there examples for existing music functions
interpreting a postevent or a chord constituent?

-- 
David Kastrup




reply via email to

[Prev in Thread] Current Thread [Next in Thread]