[prev in list] [next in list] [prev in thread] [next in thread]
List: lilypond-user
Subject: Re: Scoping problem in define-music-function
From: Marc Hohl <marc () hohlart ! de>
Date: 2010-09-27 8:54:06
Message-ID: 4CA05BAE.9070707 () hohlart ! de
[Download RAW message or body]
Marc Hohl schrieb:
> Hello list,
>
> thanks to Reinhold Kainhofer and Wilbert Berendsen I managed to get a
> callback with an
> additional argument.
>
> Now I want to write a music function like this:
>
> myFunction = #(define-music-function parser location fret music)
> (string? ly:music?)
> (let (( ... some expressions ... ))
>
> #{
> \override TabNoteHead #'stencil = #(my-special-callback fret)
> #}
> (..some more scheme stuff working on music...)
> #{
> \revert TabNoteHead #'stencil
> #}
> ))
>
> but lilypond complains with
>
> <string>:2:46: Fehler: GUILE signalisierte einen Fehler für den hier
> beginnenden Ausdruck
> \override TabNoteHead #(quote stencil) = #
> (my-special-callback fret)
> Unbound variable: fret
>
> So fret is not known within #{ ... #}.
Ah, I've found some $ missing. Now the error has gone away, but the
function is still not working.
Sorry for the noise.
Marc
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic