]> git.donarmstrong.com Git - lilypond.git/blob - input/test/music-creation.ly
*** empty log message ***
[lilypond.git] / input / test / music-creation.ly
1 \version "1.7.0"  %% or actually: 1.7.1 ...
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 #(define (make-note-req p d)
10    ;; huh? lily-guile: Could not find music type `Note_req' 
11    ;;(let* ((ml (make-music-by-name "Note_req")))
12    (let* ((ml (make-music-by-name 'NoteEvent)))
13    (ly-set-mus-property! ml 'duration d)
14    (ly-set-mus-property! ml 'pitch p)
15    ml))
16
17 #(define (make-note elts)
18    (let* ((ml (make-music-by-name 'RequestChord)))
19    (ly-set-mus-property! ml 'elements elts)
20    ml))
21
22 #(define (seq-music-list elts)
23    (let* ((ml (make-music-by-name 'SequentialMusic)))
24    (ly-set-mus-property! ml 'elements elts)
25    ml))
26
27
28 fooMusic  = #(seq-music-list
29   (list (make-note (list (make-note-req (make-pitch 1 0 0) (make-duration 2 0))))
30      (make-note (list (make-note-req (make-pitch 1 1 0) (make-duration 2 0)))))
31      )
32      
33 \score { \fooMusic }