[prev in list] [next in list] [prev in thread] [next in thread]
List: lilypond-user
Subject: Re: Harmonica tablature notation
From: "Gilles THIBAULT" <gilles.thibault () free ! fr>
Date: 2009-10-31 9:29:38
Message-ID: 44DC5E64AD5B4AFB9A39905E778228E1 () pc64
[Download RAW message or body]
> 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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic