]> git.donarmstrong.com Git - lilypond.git/blobdiff - input/test/music-creation.ly
LSR: adding new files.
[lilypond.git] / input / test / music-creation.ly
index 7d586c8ce8a12ecbbc3dccd4567adc2c2e74f4d0..c0740aa521702d466586fd86c38ca59c82c846e6 100644 (file)
@@ -1,35 +1,30 @@
-\version "1.5.68"
-\header {
+\version "2.10.0"
 
- texidoc = "You can create music expressions from Scheme.  The
- mechanism for this is rather clumsy to use, so avoid if possible."
-
- }
+% possible rename to scheme- something.  -gp
+\header { texidoc = "@cindex Scheme Music Creation
+You can engrave music using just Scheme expressions. Although those 
+expressions reflect the inner mechanism of LilyPond, they are rather 
+clumsy to use, so avoid them, if possible. "
+}
 
 #(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 
-))
+   (make-music 'NoteEvent
+    'duration d
+    'pitch p))
 
 #(define (make-note elts)
-   (let* ( (ml (ly-make-music "Request_chord")) )
-   (ly-set-mus-property! ml 'elements elts)
-   ml 
-))
+   (make-music 'EventChord
+    'elements elts))
 
 #(define (seq-music-list elts)
-   (let* ( (ml (ly-make-music "Sequential_music")) )
-   (ly-set-mus-property! ml 'elements elts)
-   ml 
-))
-
+   (make-music 'SequentialMusic
+    'elements elts))
 
-fooMusic  = #(seq-music-list
-  (list (make-note (list (make-note-req (make-pitch 1 0 0) (make-duration 2 0))))
-     (make-note (list (make-note-req (make-pitch 1 1 0) (make-duration 2 0)))))
-     )
+fooMusic = #(seq-music-list
+             (list (make-note (list (make-note-req (ly:make-pitch 1 0 0) (ly:make-duration 2 0))))
+                   (make-note (list (make-note-req (ly:make-pitch 1 1 0) (ly:make-duration 2 0))))))
      
-\score { \fooMusic }
+\score { \fooMusic 
+\layout { ragged-right = ##t }
+}
+