[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
music macros?
From: |
Han-Wen Nienhuys |
Subject: |
music macros? |
Date: |
Thu, 02 Feb 2006 02:35:28 +0100 |
User-agent: |
Mozilla Thunderbird 1.0.7-1.1.fc4 (X11/20050929) |
Erik Sandberg wrote:
Yes, just represent those commands as music functions internally. E.g.,
\transpose creates a MusicFunction expression, with a list of two pitches and
one Music as its 'elements (or 'arguments, I haven't decided yet), and
'to-music-callback is set to ly:music-transpose (or rather, to a wrapper
around that function).
OK, so we create all music expressions/events as "Music promises", which
expand into Music objects via some function as soon as they are
inspected, but have \relative deal with music-promises directly?
I think there should be a fool-proof (forced from the C++ side) way to
make sure that all Music objects are instantiated in a 'delayed' way.
Nicolas, what do you think? I think that, in a sense, \relative would
be analogous to a Scheme macro, and the rest would be like function calls.
Hmm, maybe we should even take the distinction to the extreme: have both
music functions and music macros. Nicolas?
Regarding the \parallelMusic: we should make sure that noone uses
\parallelMusic #'(A B)
to define identifiers inside music expressions. We could just leave this
aspect undocumented, or put a big warning sign that this will change in
the near future.
--
Han-Wen Nienhuys - address@hidden - http://www.xs4all.nl/~hanwen
- Re: music function refactoring, Erik Sandberg, 2006/02/01
- Re: music function refactoring, Han-Wen Nienhuys, 2006/02/01
- Re: music function refactoring, Erik Sandberg, 2006/02/01
- music macros?,
Han-Wen Nienhuys <=
- Re: music macros?, Erik Sandberg, 2006/02/02
- Re: music macros?, Nicolas Sceaux, 2006/02/03
- Re: music macros?, Erik Sandberg, 2006/02/03
- Re: music macros?, Nicolas Sceaux, 2006/02/04
- Re: music macros?, Han-Wen Nienhuys, 2006/02/04
- Re: music macros?, Nicolas Sceaux, 2006/02/04
- Re: music macros?, Erik Sandberg, 2006/02/04
- Re: music macros?, Han-Wen Nienhuys, 2006/02/05
- Re: music macros?, Erik Sandberg, 2006/02/06
- Re: music function refactoring, Han-Wen Nienhuys, 2006/02/01