On Monday 25 December 2006 07:05, Joe Neeman wrote:
> On 12/21/06, Han-Wen Nienhuys <[EMAIL PROTECTED]> wrote:
> > Erik Sandberg escreveu:
> > > BTW, in this case it may be good to register the fraction as its own
> >
> > argument
> >
> > > type, so \tuplets and \tuplet are generic music functions, both with
> > > signature
> > > (tuplet-fraction? music?)
> >
> > it would be cool if we could pull this off, that would make \time generic
> > too.
>
> Could you make 3:2 equivalent to #'(3 . 2)? Then
>  - you don't need to introduce a new type
>  - we could use x:y everywhere instead of the scary (it certainly was for
> me when I first started with lilypond) #'(x . y)

With the current way the parser works, you'd probably be able to do something 
like #(ly:export '(x . y)); of course we can add a define-music-function 
style synonym on top of that, like #(make-fraction x y)

BTW, I have some ideas to change the way SCM expressions work in the parser; 
unfortunately I haven't had the time to code lilypond for a very long time 
though, and other things are of higher priority. My idea is that the 
detection of types after ly:export should be carried out by the parser rather 
than lexer; this would allow a more intuitive behaviour of music macros the 
day they are implemented (it would be possible to delay the evaluation of 
inline SCM expressions)

-- 
Erik



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

Reply via email to