lilypond-user
[Top][All Lists]
Advanced

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

Re: composing Scheme identifiers?


From: Paul Morris
Subject: Re: composing Scheme identifiers?
Date: Sun, 2 Mar 2014 09:37:54 -0800 (PST)

Simon Albrecht-2 wrote
> scoreSetup =
> #(define-music-function
> (parser location letter)
> (string?)
> #{
> \score {
> \new Staff = "bassus" \with { instrumentName = "bassus" }
> % this is supposed to give the same result as @code{\bassK} for example…
> #(string->identifier (string-append "bass" $letter))
> }
> #}
> )

I recently tried a music function like this.  I wanted it to return a score,
but I always got:

  error: music function cannot return #<Score>

I wonder whether music functions can return a score at all, or whether I'm
just doing something wrong? Here's a simple example that produces that error
for me:

\version "2.18.0"
scoreSetup =
#(define-music-function
  (parser location letter)
  (string?)
  #{
    \score {
      { a b c d }
    }
  #})
\scoreSetup "K"



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/composing-Scheme-identifiers-tp160030p160040.html
Sent from the User mailing list archive at Nabble.com.



reply via email to

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