From b0b2885a6cf56e32cb870bb9cc38d241da3e0f18 Mon Sep 17 00:00:00 2001 From: hanwen Date: Wed, 17 Sep 2003 17:14:10 +0000 Subject: [PATCH] *** empty log message *** --- input/regression/between-systems.ly | 3 +-- input/regression/clefs.ly | 2 +- input/regression/generic-output-property.ly | 6 ++--- input/regression/output-property.ly | 28 --------------------- input/regression/tuplet-nest.ly | 4 +-- input/test/ancient-font.ly | 6 ++--- input/test/extra-offset.ly | 19 -------------- input/test/move-accidentals.ly | 16 ++++++------ input/test/move-notehead.ly | 23 ----------------- input/test/move-specific-text.ly | 4 +-- input/test/slur-shape.ly | 4 +-- input/test/staff-lines.ly | 6 ++--- input/test/staff-size.ly | 5 ++-- scm/music-functions.scm | 3 +++ scripts/convert-ly.py | 14 ++++++++++- 15 files changed, 40 insertions(+), 103 deletions(-) delete mode 100644 input/regression/output-property.ly delete mode 100644 input/test/extra-offset.ly delete mode 100644 input/test/move-notehead.ly diff --git a/input/regression/between-systems.ly b/input/regression/between-systems.ly index aea1c75a51..0939c16076 100644 --- a/input/regression/between-systems.ly +++ b/input/regression/between-systems.ly @@ -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 } diff --git a/input/regression/clefs.ly b/input/regression/clefs.ly index a04f59e2d2..1f73b2dc07 100644 --- a/input/regression/clefs.ly +++ b/input/regression/clefs.ly @@ -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{ diff --git a/input/regression/generic-output-property.ly b/input/regression/generic-output-property.ly index 34a4930f69..838150f310 100644 --- a/input/regression/generic-output-property.ly +++ b/input/regression/generic-output-property.ly @@ -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 index 18ac8df94a..0000000000 --- a/input/regression/output-property.ly +++ /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." - } -} diff --git a/input/regression/tuplet-nest.ly b/input/regression/tuplet-nest.ly index 25d70d4d10..ce49c24109 100644 --- a/input/regression/tuplet-nest.ly +++ b/input/regression/tuplet-nest.ly @@ -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 diff --git a/input/test/ancient-font.ly b/input/test/ancient-font.ly index 6829e7b242..9db88a4c4a 100644 --- a/input/test/ancient-font.ly +++ b/input/test/ancient-font.ly @@ -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 index d9068e9c6c..0000000000 --- a/input/test/extra-offset.ly +++ /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 { } -} - diff --git a/input/test/move-accidentals.ly b/input/test/move-accidentals.ly index 624ff0bac4..cbe76abb5b 100644 --- a/input/test/move-accidentals.ly +++ b/input/test/move-accidentals.ly @@ -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 index 138781ab40..0000000000 --- a/input/test/move-notehead.ly +++ /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 { } -} - diff --git a/input/test/move-specific-text.ly b/input/test/move-specific-text.ly index 3de1690d4f..7495d5e3b2 100644 --- a/input/test/move-specific-text.ly +++ b/input/test/move-specific-text.ly @@ -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} diff --git a/input/test/slur-shape.ly b/input/test/slur-shape.ly index 657485ff78..1536cdd80b 100644 --- a/input/test/slur-shape.ly +++ b/input/test/slur-shape.ly @@ -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 { diff --git a/input/test/staff-lines.ly b/input/test/staff-lines.ly index 30238451c7..ba7894f78f 100644 --- a/input/test/staff-lines.ly +++ b/input/test/staff-lines.ly @@ -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} diff --git a/input/test/staff-size.ly b/input/test/staff-size.ly index 22a056fe3d..dd6b632aca 100644 --- a/input/test/staff-size.ly +++ b/input/test/staff-size.ly @@ -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 diff --git a/scm/music-functions.scm b/scm/music-functions.scm index 591468c510..f6460e8aba 100644 --- a/scm/music-functions.scm +++ b/scm/music-functions.scm @@ -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) diff --git a/scripts/convert-ly.py b/scripts/convert-ly.py index d33e935d2b..f6b7e0e152 100644 --- a/scripts/convert-ly.py +++ b/scripts/convert-ly.py @@ -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 ) + +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')) -- 2.39.5