[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Harmonica tablature notation
From: |
Trevor Daniels |
Subject: |
Re: Harmonica tablature notation |
Date: |
Sat, 31 Oct 2009 01:05:24 -0000 |
bradford powell wrote Sunday, October 25, 2009 2:32 AM
I would appreciate any comments. One area in particular that I
have
questions about is cleaning up the case statement that converts
pitch
to markup-- specifically in that I am weirdly interspersing
lilypond
syntax (with the '(markup #:flat #:flat #:circle "2")'-type
statements). I would prefer to have a function like for blow and
for
draw that can incorporate parameters for the hole and the number
of
bends. I've tried:
#(define draw hole bends) (markup (make-list-markup (append (list
#:simple) (make-list bends #:flat) (list hole)))))
This doesn't work, any suggestions?
This is not very elegant and not very Scheme-like,
but I think it works. I'm sure someone can show us
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))
Call with ((1) (draw "4" 1 )) etc in your
case statement.
BTW, thanks for your example showing how to use
\applyMusic - it helped me with a similar problem.
Trevor