]> git.donarmstrong.com Git - lilypond.git/blobdiff - input/test/polymetric-differing-notes.ly
*** empty log message ***
[lilypond.git] / input / test / polymetric-differing-notes.ly
index 88b88fc291074e2e7563a4b65ff5eb5c8ae88538..cb0f97ecdc5dd3434f52f4395b09fb92639c1cfb 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.1.26"
+\version "2.2.0"
 
 \header{ texidoc="
 
@@ -22,28 +22,9 @@ multiplied by 3/5, so that 3/5 * 10/8 = 3/4.
 
 }
 
+#(define ((scale-music-function fraction) x)
+  (ly:music-compress x (ly:make-moment (car fraction) (cdr fraction))))
 
-#(define (scale-one-music m fraction)
-  "Maybe we should just export Music::compress to Scheme?"
-  (let*
-   ((dur (ly:music-property m 'duration)))
-   
-   (if (ly:duration? dur)
-    (let*
-     ((l (ly:duration-log dur))
-      (d (ly:duration-dot-count dur))
-      (factor (ly:duration-factor dur)))
-
-      (ly:music-set-property! m 'duration
-                            (ly:make-duration l d
-                            (* (car fraction) (car factor))
-                            (* (cdr fraction) (cdr factor))))))
-   
-   m))
-
-#(define (scale-music-function fraction)
-  (lambda (x) 
-   (music-map (lambda (y) (scale-one-music y fraction)) x)))
 
 
 
@@ -56,14 +37,14 @@ multiplied by 3/5, so that 3/5 * 10/8 = 3/4.
        \new Staff {
            \time 3/4
            \set Staff.timeSignatureFraction = #'(9 . 8)
-           \apply #display-music \apply #(scale-music-function '(2 . 3))
+           \apply #(scale-music-function '(2 . 3))
              \repeat unfold 6 { c8[ c c] }
        }
        
        \new Staff {
            \time 3/4
            \set Staff.timeSignatureFraction = #'(10 . 8)
-           \apply #display-music \apply #(scale-music-function '(3 . 5))
+           \apply #(scale-music-function '(3 . 5))
              { \repeat unfold 2 { c8[ c c] }
                \repeat unfold 2 { c8[  c] }
                |  c4. c4. \times 2/3 { c8 c c } c4  }