Laurent Martelli <[EMAIL PROTECTED]> writes:
> 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) :
> Am I missing something ?
Just two small things: you got stop and start reversed, LEFT == -1,
RIGHT==1. And also, slur requests should go with the note.
Try this:
#(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 }
--
Jan Nieuwenhuizen <[EMAIL PROTECTED]> | GNU LilyPond - The music typesetter
http://www.xs4all.nl/~jantien | http://www.lilypond.org
_______________________________________________
Gnu-music-discuss mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/gnu-music-discuss