]> git.donarmstrong.com Git - lilypond.git/commitdiff
Merge http://git.sv.gnu.org/r/lilypond
authorNicolas Sceaux <nicolas.sceaux@free.fr>
Mon, 22 Jan 2007 21:14:50 +0000 (22:14 +0100)
committerNicolas Sceaux <nicolas.sceaux@free.fr>
Mon, 22 Jan 2007 21:14:50 +0000 (22:14 +0100)
1  2 
ly/music-functions-init.ly
scm/music-functions.scm

index 431012eaeeb913cbb5792bfea54a13122c3874f6,e914b70326435296f9968343badc6d16fa7f3b78..2a8af551e98aaacd049907d738126b74c238958e
@@@ -175,6 -175,9 +175,6 @@@ cueDuring 
              'quoted-voice-direction dir
              'origin location))
  
 -%% The following causes an error with guile 1.6.8 (guile 1.6.7 and 1.8.x are fine)
 -#(use-modules (scm display-lily))
 -
  displayLilyMusic =
  #(define-music-function (parser location music) (ly:music?)
     (newline)
@@@ -528,7 -531,8 +528,8 @@@ the `parameters' assoc list."
     #{
        \overrideProperty #"Score.NonMusicalPaperColumn"
          #'line-break-system-details
-         #$(list (cons 'alignment-extra-space (cdr (assoc 'system-stretch parameters))))
+         #$(list (cons 'alignment-extra-space (cdr (assoc 'system-stretch parameters)))
+               (cons 'system-Y-extent (cdr (assoc 'system-Y-extent parameters))))
     #})
  
  %% Parser used to read page-layout file, and then retreive score tweaks.
diff --combined scm/music-functions.scm
index ed93b33fbdf396f759d60375ce3b80aa81a355a7,21617676ad71f64fef61530ba42116bb9c63e3d0..234faf41b5c40ac3237133971a76d855fe3542a4
@@@ -186,21 -186,6 +186,21 @@@ Returns `obj'
    (newline)
    obj)
  
 +;;;
 +;;; Scheme music expression --> Lily-syntax-using string translator
 +;;;
 +(use-modules (srfi srfi-39)
 +             (scm display-lily))
 +
 +(define*-public (display-lily-music expr parser #:key force-duration)
 +  "Display the music expression using LilyPond syntax"
 +  (memoize-clef-names supported-clefs)
 +  (parameterize ((*indent* 0)
 +               (*previous-duration* (ly:make-duration 2))
 +               (*force-duration* force-duration))
 +    (display (music->lily-string expr parser))
 +    (newline)))
 +
  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  
  (define-public (shift-one-duration-log music shift dot)
@@@ -430,23 -415,26 +430,26 @@@ i.e.  this is not an override
  old middleCPosition, add OCTAVATION to middleCPosition, and set
  OTTAVATION to `8va', or whatever appropriate."            
        (if (number? (ly:context-property        context 'middleCPosition))
-         (if (= octavation 0)
-             (let ((where (ly:context-property-where-defined context 'middleCPosition))
-                   (oc0 (ly:context-property context 'originalCentralCPosition)))
-               (ly:context-set-property! context 'middleCPosition oc0)
-               (ly:context-unset-property where 'originalCentralCPosition)
-               (ly:context-unset-property where 'ottavation))
-             (let* ((where (ly:context-property-where-defined context 'middleCPosition))
-                    (c0 (ly:context-property context 'middleCPosition))
-                    (new-c0 (+ c0 (* -7 octavation)))
-                    (string (cdr (assoc octavation '((2 . "15ma")
-                                                     (1 . "8va")
-                                                     (0 . #f)
-                                                     (-1 . "8vb")
-                                                     (-2 . "15mb"))))))
-               (ly:context-set-property! context 'middleCPosition new-c0)
-               (ly:context-set-property! context 'originalCentralCPosition c0)
-               (ly:context-set-property! context 'ottavation string)))))
+         (begin
+           (if (number? (ly:context-property context 'originalMiddleCPosition))
+               (let ((where (ly:context-property-where-defined context 'middleCPosition)))
+                 
+                 (ly:context-set-property! context 'middleCPosition
+                                           (ly:context-property context 'originalMiddleCPosition))
+                 (ly:context-unset-property where 'originalMiddleCPosition)
+                 (ly:context-unset-property where 'ottavation)))
+ ot        
+           (let* ((where (ly:context-property-where-defined context 'middleCPosition))
+                  (c0 (ly:context-property context 'middleCPosition))
+                  (new-c0 (+ c0 (* -7 octavation)))
+                  (string (cdr (assoc octavation '((2 . "15ma")
+                                                   (1 . "8va")
+                                                   (0 . #f)
+                                                   (-1 . "8vb")
+                                                   (-2 . "15mb"))))))
+             (ly:context-set-property! context 'middleCPosition new-c0)
+             (ly:context-set-property! context 'originalMiddleCPosition c0)
+             (ly:context-set-property! context 'ottavation string)))))
      (set! (ly:music-property m 'procedure) ottava-modify)
      (context-spec-music m 'Staff)))