lilypond-user
[Top][All Lists]
Advanced

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

Re: Scheme: passing arguments to music-function?


From: Paul Morris
Subject: Re: Scheme: passing arguments to music-function?
Date: Thu, 21 Nov 2013 16:07:23 -0800 (PST)

If I understand you correctly, you could use "cond" as shown below, and use
your other arguments in place of "SYSTEM" or "STAFF".

HTH,
-Paul

\version "2.17.95"

foo = #(define-music-function( P L arg )
         (string?)
         (cond
          ((equal? arg "system")
           #{
             \mark \markup { "SYSTEM" }
           #}
           )
          ((equal? arg "staff")
           #{
             <>^"STAFF"
           #}
           )
          (else
           #{ #}
           )))

% EXAMPLES
{ c \foo "system" c }
{ c \foo "staff" c }
{ c \foo "bar" c }



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Scheme-passing-arguments-to-music-function-tp154245p154247.html
Sent from the User mailing list archive at Nabble.com.



reply via email to

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