lilypond-devel
[Top][All Lists]
Advanced

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

Re: Feature suggestion: unfold shorthand


From: Nicolas Sceaux
Subject: Re: Feature suggestion: unfold shorthand
Date: Fri, 08 Apr 2005 19:31:32 +0200
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

Erik Sandberg <address@hidden> writes:

> An alternative notation could be something like
> \cp 7 bes8
> This would be cleaner (grammar-wise), but less intuitive. Also, it is very 
> much like (b) above, and goes a bit against the principle that lily shouldn't 
> support macros.

If an extra character does not bother you, the following music
function does what you want:

cp = #(def-music-function (parser location number music) (number? ly:music?)
        (make-music 'UnfoldedRepeatedMusic
                    'elements (list )
                    'repeat-count number
                    'element music))
{ \cp #7 bes8 }

\cp is not a very good name ihmo, \dotimes maybe? but it's longer.

BTW, this is no "macro".

nicolas




reply via email to

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