lilypond-user
[Top][All Lists]
Advanced

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

Scheme: passing arguments to music-function?


From: Graham King
Subject: Scheme: passing arguments to music-function?
Date: Thu, 21 Nov 2013 23:17:08 +0000

I'm trying, in a somewhat haphazard way, to learn some more Scheme, but I'm clearly not reading the right stuff to solve the following problem.  Please can someone point me in the right direction.

I have the following function (hugely abbreviated here):

foo = #(define-music-function( P L arg1 arg2 arg3 ... )
                             (type1? type2? type3? ... )
          #{
              \mark \markup {
                                % bunch of stuff
                            }
          #}
       )

I would like to pass an argument, arg4 say, equal to "system" or "staff".
\mark would be replaced by a parameter taking the values:
\mark if arg4 == "system", and
<>^ if arg4 == "staff"

Grateful for any light you can shed on this.
reply via email to

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