Mark Polesky schrieb:
Marc Hohl wrote:
Sorry if this is a stupid question, but here im totally stuck:
Not a stupid question. This involves "parser variables" which are
giving us developers troubles, too! If you're curious, you can
follow this long thread:
http://lists.gnu.org/archive/html/lilypond-devel/2009-07/msg00921.html
I followed this thread on -devel, but at some point, it went over my
head, so
I didn't read in detail.
I need to define a boolean which is to be changed within a music-function
and a stencil callback.
For the music-function you can do this:
% you can also do:
% mybool = ##f
#(define mybool #f)
myfunc =
#(define-music-function (parser location note) (ly:music?)
(ly:parser-define! parser 'mybool #t)
(let* ((mybool (ly:parser-lookup parser 'mybool))
(color (if mybool red blue)))
#{
\override NoteHead #'color = $color
$note
#}))
Thank you! At least I can play with this ...
The callback is a little trickier for me for the moment.
I'll get back to you.
Great. I am awaiting your response.
Marc
- Mark
_______________________________________________
lilypond-user mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-user