lilypond-user
[Top][All Lists]
Advanced

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

Re: functions with multiple arguments


From: Tom Sgouros
Subject: Re: functions with multiple arguments
Date: Sun, 3 Jan 2021 21:02:46 -0500

Aha!

Thank you, I could have looked at that for a week without realizing it's supposed to be a list of functions not a list of function calls.

 -Tom

On Sun, Jan 3, 2021 at 7:46 PM Knute Snortum <ksnortum@gmail.com> wrote:
I think this is the correct syntax:

rpt =
#(define-music-function
     (parser location note1 note2)
     (ly:pitch? ly:pitch?)
   #{
     $note1 1 $note2 1
   #})
\rpt a bes

--
Knute Snortum

On Sun, Jan 3, 2021 at 4:04 PM Tom Sgouros <tomfool@as220.org> wrote:
>
> Hello all:
>
> This works:
>
> rpt =
> #(define-music-function
>      (parser location note1)
>      (ly:pitch?)
>    #{
>      $note1 1
>    #})
> \rpt a
>
> Why doesn't this? ("Wrong number of arguments to #<procedure #f (parser location note1 note2)>") What am I missing?
>
> rpt =
> #(define-music-function
>      (parser location note1 note2)
>      (ly:pitch?) (ly:pitch?)
>    #{
>      $note1 1 note2 1
>    #})
> \rpt a bes
>
> I was imagining I could use a function like this to generate groups of sextets efficiently, with four notes input to make the groups of six and making the arpeggio automatically. Perhaps barking up the wrong tree?
>
> Thank you,
>
>  -Tom

reply via email to

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