]> git.donarmstrong.com Git - lilypond.git/commitdiff
*** empty log message ***
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 17 Sep 2003 17:14:10 +0000 (17:14 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 17 Sep 2003 17:14:10 +0000 (17:14 +0000)
15 files changed:
input/regression/between-systems.ly
input/regression/clefs.ly
input/regression/generic-output-property.ly
input/regression/output-property.ly [deleted file]
input/regression/tuplet-nest.ly
input/test/ancient-font.ly
input/test/extra-offset.ly [deleted file]
input/test/move-accidentals.ly
input/test/move-notehead.ly [deleted file]
input/test/move-specific-text.ly
input/test/slur-shape.ly
input/test/staff-lines.ly
input/test/staff-size.ly
scm/music-functions.scm
scripts/convert-ly.py

index aea1c75a51be39d24263436b795d5a8171821326..0939c16076cb8bf05f5cdf972e23a350ad42d5d1 100644 (file)
@@ -16,8 +16,7 @@ of course.
 \score {
 \notes \relative c' { c1
 
-       \context Score \outputproperty #(make-type-checker 'paper-column-interface)
-               #'between-system-string = #"(pagebreak)\n\n"
+       \context Score \applyoutput #(outputproperty-compatibility (make-type-checker 'paper-column-interface) 'between-system-string "(pagebreak)\n\n")
        \break
 
 c1 }
index a04f59e2d2de2b3d58ab38bcdfc669f783f9588c..1f73b2dc07faf800b16ac7926e1f5c3b2ba85315 100644 (file)
@@ -28,7 +28,7 @@ way, so this is fragile as well.
         \property Staff.Clef \override #'transparent = ##t
          \clef "treble" c'1^"transparent=\#t" \bar "||"
         \property Staff.Clef \override #'transparent = ##f
-        \context Staff \outputproperty #(make-type-checker 'clef-interface) #'full-size-change = ##t
+        \context Staff \applyoutput  #(outputproperty-compatibility (make-type-checker 'clef-interface) 'full-size-change #t)
          \clef "french" c'1^"full-size-change = \#t" \bar "|."
          }
          \paper{
index 34a4930f695302d45fc8009151dc90b4ec3b538f..838150f310e2046a96c9b6f15713fb79eb20a358 100644 (file)
@@ -10,13 +10,11 @@ setting the @code{extra-offset} of a grob.
 
 \score{
        \notes\relative c''{
-       \outputproperty #(make-type-checker 'note-head-interface) 
-               #'extra-offset = #'(2 . 3)
+           \applyoutput #(outputproperty-compatibility (make-type-checker 'note-head-interface) 'extra-offset '(2 . 3))
        c2
        c
        \context Score {
-               \outputproperty #(make-type-checker 'mark-interface) 
-               #'extra-offset = #'(-1 . 4)
+           \applyoutput #(outputproperty-compatibility (make-type-checker 'mark-interface) 'extra-offset '(-1 . 4))
        }
        \mark A
        d1
diff --git a/input/regression/output-property.ly b/input/regression/output-property.ly
deleted file mode 100644 (file)
index 18ac8df..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-
-\header { texidoc = "
-
-Setting @code{\outputproperty} is a clumsy and deprecated way of changing
-grob definitions.  In this example, the predicate checks the @code{text}
-object property, to shift only the `m.d.'  text, but not the `two'
-text.  Since both scripts are @code{TextScript} grobs, using
-possible to use @code{\override} would shift both texts.
-
-"
-
-}
-
-\version "1.9.4"
-
-#(define (make-text-checker text)
-   (lambda (grob) (equal? text (ly:get-grob-property grob 'text))))
-
-\score {    
-  \notes\relative c''' {
-    a^"two"^"m.d."
-    \context Voice
-      \outputproperty #(make-text-checker (make-simple-markup "m.d."))
-        #'extra-offset = #'(-4.0 . -3.5)
-    a^"two"^"m.d."    
-    a^"two"^"m.d."    
-  }
-}
index 25d70d4d10e891741f845cc9c2c0a1b4d2b41a5b..ce49c241099866a09084da75eabe90a246601983 100644 (file)
@@ -18,8 +18,8 @@
 
     \property Voice.tupletNumberFormatFunction = #fraction-tuplet-formatter
 
-    \outputproperty #(make-text-checker-once "2:3")
-      #'extra-offset = #'(0 . 1.5)
+    \applyoutput #(outputproperty-compatibility (make-text-checker-once "2:3")
+                  'extra-offset '(0 . 1.5))
     \times 2/3 {
       \times 2/3 {
         a a a
index 6829e7b2424cbde4b47f5fd65a9bd8e5c9d31cb5..9db88a4c4a7280d91ea50c9e7a37791a5d810749 100644 (file)
@@ -16,8 +16,7 @@ upperStaff =  \context GregorianStaff = upperStaff <<
 
     % this is broken until further notice -- see refman
     % \property Staff.StaffSymbol \override #'line-count = #4
-    \context Staff \outputproperty #(make-type-checker 'staff-symbol-interface)
-      #'line-count = #4
+    \context Staff \applyoutput #(outputproperty-compatibility (make-type-checker 'staff-symbol-interface) 'line-count 4)
 
     \notes \transpose c c {
        \property Staff.KeySignature \override #'style = #'vaticana
@@ -120,8 +119,7 @@ lowerStaff =  \context MensuralStaff = lowerStaff <<
     
     % this is broken until further notice -- see refman
     % \property Staff.StaffSymbol \override #'line-count = #5
-    \context Staff \outputproperty #(make-type-checker 'staff-symbol-interface)
-      #'line-count = #5
+    \context Staff \applyoutput #(outputproperty-compatibility (make-type-checker 'staff-symbol-interface) 'line-count 5)
 
     \notes \transpose c c {
        \property Voice.autoBeaming = ##f
diff --git a/input/test/extra-offset.ly b/input/test/extra-offset.ly
deleted file mode 100644 (file)
index d9068e9..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-
-\version "1.9.4"
-\header { texidoc = "@cindex Scheme Move Notehead
-You can move objects around with scheme.  This example shows how to
-move noteheads around. " }
-
-fragment = \notes {
-    \outputproperty #(make-type-checker 'note-head-interface)
-      #'extra-offset = #'(2 . 3)
-    c''2 c
-}
-
-\paper { raggedright = ##t} 
-
-\score {
-  \notes\relative c \fragment
-  \paper { }  
-}
-
index 624ff0bac433250d5e6d9b31dafe5f382e5110b5..cbe76abb5b5bf1a6548e9a4d3c29262ec228e7b4 100644 (file)
@@ -18,14 +18,14 @@ involves some scheme code. " }
     c2.
     <<
 \property Staff.AccidentalPlacement = \turnOff
-\context Staff \outputproperty #(make-acc-position-checker 9)
-                               #'extra-offset = #'(-1 . 0)
-\context Staff \outputproperty #(make-acc-position-checker 5)
-                               #'extra-offset = #'(-2 . 0)
-\context Staff \outputproperty #(make-acc-position-checker 3)
-                               #'extra-offset = #'(-3 . 0)
-\context Staff \outputproperty #(make-acc-position-checker 2)
-                               #'extra-offset = #'(-4 . 0)
+\context Staff \applyoutput #(outputproperty-compatibility (make-acc-position-checker 9)
+                               'extra-offset  '(-1 . 0))
+\context Staff \applyoutput #(outputproperty-compatibility (make-acc-position-checker 5)
+                               'extra-offset  '(-2 . 0))
+\context Staff \applyoutput #(outputproperty-compatibility (make-acc-position-checker 3)
+                               'extra-offset  '(-3 . 0))
+\context Staff \applyoutput #(outputproperty-compatibility (make-acc-position-checker 2)
+                               'extra-offset  '(-4 . 0))
       d!4
       eis
       gis
diff --git a/input/test/move-notehead.ly b/input/test/move-notehead.ly
deleted file mode 100644 (file)
index 138781a..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-
-\version "1.9.4"
-\header { texidoc = "@cindex Scheme Move Notehead
-
-You can move objects around with the property extra-offset.  This
-example shows how to move noteheads around.  It uses the
-@code{\outputproperty} command.
-
-" }
-
-fragment = \notes {
-    \outputproperty #(make-type-checker 'note-head-interface)
-      #'extra-offset = #'(2 . 3)
-    c''2 c
-}
-
-\paper { raggedright = ##t} 
-
-\score {
-  \notes\relative c \fragment
-  \paper { }  
-}
-
index 3de1690d4f93f9ca3d57e5644be385d8c242313e..7495d5e3b252a1e53cc3f118116e58fc1a65f255 100644 (file)
@@ -11,8 +11,8 @@ move text around. " }
 \score {
   \notes\relative c''' {
     \property Voice.Stem \set #'direction = #1
-    \outputproperty #(make-text-checker (make-simple-markup "m.d."))
-      #'extra-offset = #'(-3.5 . -4.5)
+    \applyoutput #(outputproperty (make-text-checker (make-simple-markup "m.d."))
+      'extra-offset '(-3.5 . -4.5))
     a^2^"m.d."
   }
   \paper { raggedright = ##t}
index 657485ff78106c5298bb6e3ae5da12e64607cf0a..1536cdd80b4bc7f741aa61a6dd9a39ed685229fd 100644 (file)
@@ -6,8 +6,8 @@
 }
 
 x = {
-  \outputproperty #(make-type-checker 'note-head-interface) 
-    #'extra-offset = #'(-1 . 0)
+  \applyoutput #(outputproperty-compatibility (make-type-checker 'note-head-interface) 
+                'extra-offset '(-1 . 0))
 }
 
 \score {
index 30238451c7e5e73d44d26c673fbb68e702c28a77..ba7894f78f831c4425e854559383b610b0aa6159 100644 (file)
@@ -19,14 +19,12 @@ lower = \notes\relative c {
     %\time 4/4
     \new Staff <<
       \upper
-      \outputproperty #(make-type-checker 'staff-symbol-interface)
-        #'line-count = #5
     >>  
     \new Staff <<
       \clef bass
       \lower
-      \outputproperty #(make-type-checker 'staff-symbol-interface)
-        #'line-count = #4
+      \applyoutput #(outputproperty-compatibility (make-type-checker 'staff-symbol-interface)
+        'line-count = 4)
     >>  
   >>
   \paper { raggedright=##t}  
index 22a056fe3d071e260880c866f7a796734c35a0db..dd6b632aca25548f0c837d02b980a0cc33e48672 100644 (file)
@@ -5,7 +5,7 @@
 
 Setting staff sizes is a little clumsy.  There are two options: using
 @code{StaffContainer} and override/revert, or
-@code{\outputproperty}. Both methods are shown in this example. "
+@code{\applyoutput}. Both methods are shown in this example. "
 
 }
 
@@ -24,8 +24,7 @@ Setting staff sizes is a little clumsy.  There are two options: using
 
 \new Staff \relative c'' { \dynamicDown c,,4 \ff c c c  }
 \new Staff {
-  \context Staff \outputproperty #(make-type-checker 'staff-symbol-interface)
-    #'staff-space =  #0.8
+  \context Staff \applyoutput #(outputproperty-compatibility (make-type-checker 'staff-symbol-interface) 'staff-space 0.8)
   \property Staff.fontSize = #-1
   \clef bass
   c8 c c c  c c c c
index 591468c510347a6f57af2a485ca3362b71ea1f4b..f6460e8aba976c596f68ed7dd0c5eb4d6877fdda 100644 (file)
@@ -538,6 +538,9 @@ Rest can contain a list of beat groupings
     ;;(eq? #t (ly:get-grob-property elt symbol))
     (not (eq? #f (memq symbol (ly:get-grob-property elt 'interfaces))))))
 
+(define-public ((outputproperty-compatibility func sym val) grob g-context ao-context)
+  (if (func grob)
+      (ly:set-grob-property! grob sym val)))
 
 ;;
 (define-public (smart-bar-check n)
index d33e935d2b528083a13ec1c7236bd42c7cca1ade..f6b7e0e152b854d33088031068fa97bdc2fefb87 100644 (file)
@@ -1543,8 +1543,20 @@ def conv (str):
                return '(ly:make-pitch %s %s %s)' % (m.group(1), m.group (2), alt)
        
        str =re.sub ("\\(ly:make-pitch *([0-9-]+) *([0-9-]+) *([0-9-]+) *\\)", sub_alteration, str) 
+
+       m= re.search ("\\\\outputproperty #([^#]+)[\t\n ]*#'([^ ]+)", str)
+       if m:
+               sys.stderr.write (\
+                       r"""\outputproperty found, 
+Please hand-edit, using
+
+  \applyoutput #(outputproperty-compatibility %s '%s <GROB PROPERTY VALUE>)
+
+as a substitution text.""" % (m.group (1), m.group (2)) )
+               raise FatalConversionError
+       
        return str
-conversions.append (((1,9,7), conv, 'use symbolic constants for alterations.'))
+conversions.append (((1,9,7), conv, 'use symbolic constants for alterations, remove \\outputproperty'))