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.

_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to