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: Graham King
Subject: Re: Scheme: passing arguments to music-function?
Date: Fri, 22 Nov 2013 11:24:50 +0000

On Fri, 2013-11-22 at 06:56 +0100, David Kastrup wrote: 
> Graham King <address@hidden> writes:
> 
> >> On Fri, 2013-11-22 at 00:46 +0100, David Kastrup wrote:
> >>
> >>> Graham King <address@hidden> writes:
> >>> 
> >>> Assuming a reasonably recent version of 2.17, use the predicate symbol?
> >>> for the type.  The whole construct for your cases is sufficiently
> >>> different that it's probably easiest to do the body as
> >>> 
> >>> (let ((bunch #{ \markup { bunch of stuff } #}))
> >>>   (case arg4
> >>>     ((system) #{ \mark #bunch #})
> >>>     ((staff) #{ <>^ #bunch #})
> >>>     (else #{ \mark \markup \color #red #bunch })))
> >> 
> >
> > Thanks David,
> > I hadn't considered that approach, and it looks very promising.  I'm on
> > 2.16 at the moment - I hope that won't be a problem.
> 
> The above quote starts with "Assuming a reasonably recent version of
> 2.17".
> 
> With 2.16, you either need to give your argument as #'system or #'staff,
> or make that argument of type string?.
> 
> In which case you'll need to write (case (string->symbol arg4) ... or
> use a different construct than case.
> 
> And #{ <>^ #bunch #} will likely need to use $bunch instead, and the
> same might go for the else-part.

Thanks for this.  I'm copying this to the list in case it helps others.  
> 
> And please trim the quoted material to just the relevant context and
> answer directly below each point.  <...>
Apologies for this and for inadvertently replying off-list.



reply via email to

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