lilypond-user
[Top][All Lists]
Advanced

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

functions with multiple arguments


From: Tom Sgouros
Subject: functions with multiple arguments
Date: Sun, 3 Jan 2021 19:04:17 -0500

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]