]> git.donarmstrong.com Git - lilypond.git/blobdiff - input/test/music-box.ly
* lily/paper-book.cc (output): load framework module
[lilypond.git] / input / test / music-box.ly
index b94eb9010cdf37f74b4617f18fa8b84a625ccab1..7b3a2583fc22b15a35d43705433d0bf2fd39646c 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.1.25"
+\version "2.3.2"
 \include "deutsch.ly"
 % possible rename to scheme- something.  -gp
 % TODO: ask if it needs to have so many empty bars in the middle.  -gp
@@ -8,7 +8,7 @@ using Scheme functions to avoid typing work. " }
 
 
 #(define (transform music)
-  (let* ((es (ly:get-mus-property music 'elements))
+  (let* ((es (ly:music-property music 'elements))
          (n  (ly:music-name music))
         )
    (if (not (equal? n "Sequential_music"))
@@ -17,7 +17,7 @@ using Scheme functions to avoid typing work. " }
       (let recurse ((elts es))
        (if (not (equal? elts '()))
         (begin
-           ((trans (ly:get-mus-property (cadr elts) 'elements)) (car elts))
+           ((trans (ly:music-property (cadr elts) 'elements)) (car elts))
           (set-cdr! elts (cddr elts))
           (recurse (cdr elts))
         )
@@ -30,17 +30,17 @@ using Scheme functions to avoid typing work. " }
  )
 
 #(define ((trans pitches) music)
-  (let* ((es (ly:get-mus-property music 'elements))
-         (e (ly:get-mus-property music 'element))
-         (p (ly:get-mus-property music 'pitch)))
+  (let* ((es (ly:music-property music 'elements))
+         (e (ly:music-property music 'element))
+         (p (ly:music-property music 'pitch)))
 
     (if (pair? es)
-        (ly:set-mus-property!
+        (ly:music-set-property!
          music 'elements
          (map (trans pitches) es)))
 
     (if (ly:music? e)
-        (ly:set-mus-property!
+        (ly:music-set-property!
          music 'element
          ((trans pitches) e)))
 
@@ -48,10 +48,10 @@ using Scheme functions to avoid typing work. " }
        (let* ((o (ly:pitch-octave p))
               (n (ly:pitch-notename p))
               (i (+ (* 7 o) n))
-             (pes (ly:get-mus-property (list-ref pitches i) 'elements))
-             (pnew (ly:get-mus-property (car pes) 'pitch))
+             (pes (ly:music-property (list-ref pitches i) 'elements))
+             (pnew (ly:music-property (car pes) 'pitch))
              )
-          (ly:set-mus-property! music 'pitch pnew)
+          (ly:music-set-property! music 'pitch pnew)
        )
     )
     music
@@ -62,7 +62,7 @@ using Scheme functions to avoid typing work. " }
 
 
 
-\version "2.1.25"
+\version "2.3.2"
 
 pat = \notes \transpose c c' \repeat unfold 2 {
   << { \context Staff=up {r8 e16 f g e f g } }
@@ -84,7 +84,7 @@ endc = \notes {\stemDown \tieDown c,,2~c,, c,,~c,, c,,1_\fermata }
   \notes \transpose c c' \context PianoStaff <<
     \context Staff=up   { \clef "G"  }
     \context Staff=down { \clef "F" }
-    { \apply #transform {\pat {c e g c' e' }
+    { \applymusic #transform {\pat {c e g c' e' }
                          \pat {c d a d' f' }
                         \pat {h, d g d' f' }
                         \pat {c e g c' e' }
@@ -130,8 +130,8 @@ endc = \notes {\stemDown \tieDown c,,2~c,, c,,~c,, c,,1_\fermata }
     }
   >>
   \paper {
-    \translator {
-      \PianoStaffContext
+    \context {
+      \PianoStaff
       \override VerticalAlignment #'forced-distance = #10
     }