lilypond-user
[Top][All Lists]
Advanced

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

Re: Harmonica tablature notation


From: Gilles THIBAULT
Subject: Re: Harmonica tablature notation
Date: Sat, 31 Oct 2009 10:29:38 +0100

how to code a tail-recursive version of this.

#(define (draw hole nbends)
 (define bend-glyphs "")
 (while
   (> nbends 0)
   (set! bend-glyphs (markup #:flat bend-glyphs))
   (set! nbends (1- nbends)))
 (markup bend-glyphs #:circle hole))

Perhaps something like that ? :

#(define (draw hole nbends)
 (let loop ((bend-glyphs "")
                (n nbends))
     (if (> n 0)
       (loop (markup #:flat bend-glyphs)
                (1- n))
       (markup bend-glyphs #:circle hole))))

thanks for your example showing how to use
\applyMusic - it helped me with a similar problem.

Well, for me, I don't really undersand the difference between :
\context Voice = "melody"
               \applyMusic #(lambda (x) (music-map add-harmonica x)) \notes
and
\context Voice = "melody"  \musicMap #add-harmonica \notes  ?

It seems to have the same result.

Gilles






reply via email to

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