lilypond-user
[Top][All Lists]
Advanced

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

Re: Creating new operators


From: David Kastrup
Subject: Re: Creating new operators
Date: Sun, 18 May 2014 16:32:23 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

Philippe Baril Lecavalier <address@hidden> writes:

> Dear list,
>
> After much search, I finally found the "\repeat unfold N", but is it
> possible with scheme to create new operators, to abbreviate things?

[...]

> So for
> simplicity, could one create a new operator through scheme, like "**"?
> Example of what I mean:
>
>     {c8 g e g} ** 6
> would amount to:
>     \repeat unfold 6 {c8 g e g}

No.  The closest you can probably get is

"\\*" =
#(define-music-function (parser location n m) (index? ly:music?)
  (make-music 'UnfoldedRepeatedMusic
   'repeat-count n
   'element m))

\*6{c8 g e g}
But that requires a fairly recent variant of LilyPond (2.17.25 or later).

-- 
David Kastrup

reply via email to

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