]> git.donarmstrong.com Git - lilypond.git/blob - input/test/music-creation.ly
covnert-ly
[lilypond.git] / input / test / music-creation.ly
1 \version "1.5.68"
2 \header {
3
4  texidoc = "You can create music expressions from Scheme.  The
5  mechanism for this is rather clumsy to use, so avoid if possible."
6
7  }
8  
9
10 #(define (make-note-req p d)
11    (let* ( (ml (ly-make-music "Note_req")) )
12    (ly-set-mus-property! ml 'duration d)
13    (ly-set-mus-property! ml 'pitch p)   
14    ml 
15 ))
16
17 #(define (make-note elts)
18    (let* ( (ml (ly-make-music "Request_chord")) )
19    (ly-set-mus-property! ml 'elements elts)
20    ml 
21 ))
22
23 #(define (seq-music-list elts)
24    (let* ( (ml (ly-make-music "Sequential_music")) )
25    (ly-set-mus-property! ml 'elements elts)
26    ml 
27 ))
28
29
30 fooMusic  = #(seq-music-list
31   (list (make-note (list (make-note-req (make-pitch 1 0 0) (make-duration 2 0))))
32      (make-note (list (make-note-req (make-pitch 1 1 0) (make-duration 2 0)))))
33      )
34      
35 \score { \fooMusic }