[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Music functions for repetition
From: |
David Kastrup |
Subject: |
Re: Music functions for repetition |
Date: |
Mon, 30 Jul 2018 17:44:24 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
Álvaro Cáceres Muñoz <address@hidden> writes:
> I am starting to play with lilypond functions. I wanted to write a function
> that allowed me to use repeat unfold, but typing less. This is the code I
> have right now:
>
> \version "2.14.2"
All bets are off with that version.
> rpt =
> #(define-music-function
> (parser location repetitions drumnotes)
> (number? ly:music?)
> #{
> \repeat unfold #repetitions #drumnotes
> #}
> )
Also fails in current version. Write $drumnotes instead of #drumnotes :
it would appear that \repeat does not take unqualified Scheme
expressions as its music argument.
Which is a pity since $drumnotes will cause an unnecessary copy but I
don't see a good way around it right now short of writing the whole
thing completely in Scheme rather than using #{ #} .
--
David Kastrup