[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
slur in scheme
From: |
Laurent Martelli |
Subject: |
slur in scheme |
Date: |
19 Mar 2001 07:53:06 +0100 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 |
I'm trying to make slurs with the new ly-make-music function, but all
my attempts failed. Here's what I tried (with 1.3.140) :
#(define (make-note-req p d)
(let* ( (ml (ly-make-music "Note_req")) )
(ly-set-mus-property ml 'duration d)
(ly-set-mus-property ml 'pitch p)
ml
))
#(define (make-note elts)
(let* ( (ml (ly-make-music "Request_chord")) )
(ly-set-mus-property ml 'elements elts)
ml
))
#(define (seq-music-list elts)
(let* ( (ml (ly-make-music "Sequential_music")) )
(ly-set-mus-property ml 'elements elts)
ml
))
#(define (start-slur)
(let* ( (ml (ly-make-music "Span_req")) )
(ly-set-mus-property ml 'span-type "slur")
(ly-set-mus-property ml 'span-direction 1)
ml
))
#(define (stop-slur)
(let* ( (ml (ly-make-music "Span_req")) )
(ly-set-mus-property ml 'span-direction -1)
(ly-set-mus-property ml 'span-type "slur")
ml
))
fooMusic = #(seq-music-list
(list (make-note (list (make-note-req (make-pitch 1 0 0) (make-duration 2
0))))
(start-slur)
(make-note (list (make-note-req (make-pitch 1 1 0) (make-duration 2 0))))
(make-note (list (make-note-req (make-pitch 1 2 0) (make-duration 2 0))))
(stop-slur)
(make-note (list (make-note-req (make-pitch 1 3 0) (make-duration 2 0)))))
)
\score { \fooMusic }
Am I missing something ?
--
Laurent Martelli
address@hidden http://www.linuxfan.com/~laurent
- slur in scheme,
Laurent Martelli <=