> \version "2.25.13"
>
> #(define (string-list? arg) (and (list? arg) (every string? arg)))
> #(define (string-or-string-list? arg) (or (string? arg) (string-list?
> arg)))
>
> quoteDuring =
> #(define-music-function (what main-music) (string-or-string-list?
> ly:music?)
>    (fold (lambda (elem prev)
>            (make-music 'QuoteMusic
>                        'element prev
>                        'quoted-music-name elem))
>      main-music (if (list? what) what (list what))))

Very very nice ! And quite simple (not for me to code though but I
understand it !)

> \quoteDuring "oboeI" \quoteDuring "fluteII" \quoteDuring "fluteI"
> \quoteDuring "piccolo" { s4 }

Now that is awesome (and would have fit my needs) but redefining the
function seems a bit cleaner.

Thank you so much Aaron, this will be quite useful.

Greetings to you all !
-- 
Pierre-Luc Gauthier

Reply via email to