]> git.donarmstrong.com Git - lilypond.git/blob - input/test/music-creation.ly
LSR: adding new files.
[lilypond.git] / input / test / music-creation.ly
1 \version "2.10.0"
2
3 % possible rename to scheme- something.  -gp
4 \header { texidoc = "@cindex Scheme Music Creation
5 You can engrave music using just Scheme expressions. Although those 
6 expressions reflect the inner mechanism of LilyPond, they are rather 
7 clumsy to use, so avoid them, if possible. "
8 }
9
10 #(define (make-note-req p d)
11    (make-music 'NoteEvent
12     'duration d
13     'pitch p))
14
15 #(define (make-note elts)
16    (make-music 'EventChord
17     'elements elts))
18
19 #(define (seq-music-list elts)
20    (make-music 'SequentialMusic
21     'elements elts))
22
23 fooMusic = #(seq-music-list
24              (list (make-note (list (make-note-req (ly:make-pitch 1 0 0) (ly:make-duration 2 0))))
25                    (make-note (list (make-note-req (ly:make-pitch 1 1 0) (ly:make-duration 2 0))))))
26      
27 \score { \fooMusic 
28 \layout { ragged-right = ##t }
29 }
30