]> git.donarmstrong.com Git - lilypond.git/commitdiff
* scm/define-context-properties.scm
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 23 Aug 2006 21:19:36 +0000 (21:19 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 23 Aug 2006 21:19:36 +0000 (21:19 +0000)
(translator-property-description): robustness: detect type errors
in property definitions.

* lily/parser.yy (score_body): protect SCORE_IDENTIFIER result
after getting it from SCM.

* lily/parser.yy (Lily_lexer::try_special_identifiers): unprotect
clones after creation. This plugs a huge memory leak.

17 files changed:
ChangeLog
input/les-nereides.ly
input/manual/screech-boink.ly
input/no-notation/display-lily-tests.ly
input/no-notation/dynamic-absolute-volume.ly
input/no-notation/midi-volume-equaliser.ly
input/regression/drums.ly
input/regression/metronome-marking.ly
input/sakura-sakura.ly
input/test/extra-staff.ly
input/test/music-box.ly
input/test/staff-container.ly
input/test/temporary-stave.ly
input/test/time-signature-staff.ly
input/typography-demo.ly
lily/parser.yy
scm/define-context-properties.scm

index 5fefaf8d204567250c450adc74fa600c343a3dc8..6b309f37da5fae1d392f57c53e1f7abe01ac5e2b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2006-08-23  Han-Wen Nienhuys  <hanwen@lilypond.org>
 
+       * scm/define-context-properties.scm
+       (translator-property-description): robustness: detect type errors
+       in property definitions.
+
+       * lily/parser.yy (score_body): protect SCORE_IDENTIFIER result
+       after getting it from SCM. 
+
        * lily/smobs.cc (protect_smob): switch off fancy smob protection
        for now. 
 
index c987b46d5ae83c760fb38ce4361a06ecd5fdff8a..ea0943c7005c6d2b3e1af379f203168eb8c73148 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.7.39"
+\version "2.9.16"
 
 \header {
     composer = "ARTHUR GRAY"
index 7528ce7e51720ad5a4f65cacbeb954e41c77c779..7b11aa079f84b7f1580bc015ada73bc1beb57dc3 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.7.39"
+\version "2.9.16"
 \header {
     title = "Screech and boink"
     subtitle = "Random complex notation"
           >>
        }
     >>
-    \midi { \tempo 8 = 60 }
+    
+  \midi {
+    \context {
+      \Score
+      tempoWholesPerMinute = #(ly:make-moment 60 8)
+      }
+    }
+
+
 
     \layout {
        ragged-right = ##t 
index 8c99abf8352fb486e92c0decb9c743a485430b3c..5b931ad495b269aeb395c2b53c8ab559d5a6fd9a 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.9.5"
+\version "2.9.16"
 
 #(use-modules (srfi srfi-13)
               (ice-9 format))
index 6a6397c54cdf9a363188a0fd59393da799fa5d21..c91d8a02bf6dd2f7e3c049a8719238ba52f7ca9b 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.7.39"
+\version "2.9.16"
 \header {
     texidoc = "@cindex Dynamic Absolute Volume
 Absolute dynamics have an effect on MIDI files.
@@ -21,8 +21,14 @@ a\fff
 a\sf
 }
 \layout{ ragged-right = ##t }
-\midi{
-\tempo 1 = 60
-}
+
+  \midi {
+    \context {
+      \Score
+      tempoWholesPerMinute = #(ly:make-moment 60 1)
+      }
+    }
+
+
 }
 
index a8dbfa745104e1639a6d4eb511e6424ad4faca6e..d577ebd2560f396c4bad1ad0276ebad64e4aac00 100644 (file)
@@ -1,5 +1,5 @@
 #(ly:set-option 'old-relative)
-\version "2.7.39"
+\version "2.9.16"
 \header {
 texidoc = "@cindex Midi Volume Equaliser
 The full orchestra plays a notes, where groups stop one after
@@ -23,32 +23,32 @@ Override, see scm/midi.scm:
 
 flauti =  \relative c' {
   \set Staff.midiInstrument = #"flute"
-  \set Staff.instrument = #"2 Flauti"
-  \set Staff.instr = #"Fl."
+  \set Staff.instrumentName = #"2 Flauti"
+  \set Staff.shortInstrumentName = #"Fl."
 
   c1\f R1*10
 }
 
 oboi =  \relative c' {
   \set Staff.midiInstrument = #"oboe"
-  \set Staff.instrument = #"2 Oboi"
-  \set Staff.instr = #"Ob."
+  \set Staff.instrumentName = #"2 Oboi"
+  \set Staff.shortInstrumentName = #"Ob."
 
   R1*1 c1\f R1*9
 }
 
 clarinetti =  \relative c' {
   \set Staff.midiInstrument = #"clarinet"
-  \set Staff.instrument = #"Clarinetti"
-  \set Staff.instr = #"Cl"
+  \set Staff.instrumentName = #"Clarinetti"
+  \set Staff.shortInstrumentName = #"Cl"
 
   R1*2 c1\f R1*8
 }
 
 fagotti =  \relative c' {
   \set Staff.midiInstrument = #"bassoon"
-  \set Staff.instrument = #"2 Fagotti"
-  \set Staff.instr = #"Fg."
+  \set Staff.instrumentName = #"2 Fagotti"
+  \set Staff.shortInstrumentName = #"Fg."
 
   \clef bass
   R1*3 c1\f R1*7
@@ -56,16 +56,16 @@ fagotti =  \relative c' {
 
 corni =  \relative c' {
   \set Staff.midiInstrument = #"french horn"
-  \set Staff.instrument = #"Corni"
-  \set Staff.instr = #"Cor"
+  \set Staff.instrumentName = #"Corni"
+  \set Staff.shortInstrumentName = #"Cor"
 
   R1*4 c1\f R1*6
 }
 
 trombe =  \relative c' {
   \set Staff.midiInstrument = #"trumpet"
-  \set Staff.instrument = #"Trombe"
-  \set Staff.instr = #"Tp."
+  \set Staff.instrumentName = #"Trombe"
+  \set Staff.shortInstrumentName = #"Tp."
 
   \clef bass
   R1*5 c1\f R1*5
@@ -73,32 +73,32 @@ trombe =  \relative c' {
 
 timpani =  \relative c' {
   \set Staff.midiInstrument = #"timpani"
-  \set Staff.instrument = #"Timpani"
-  \set Staff.instr = #"Timp."
+  \set Staff.instrumentName = #"Timpani"
+  \set Staff.shortInstrumentName = #"Timp."
 
   R1*6 c1\f R1*4
 }
 
 violinoI =  \relative c' {
   \set Staff.midiInstrument = #"violin"
-  \set Staff.instrument = #"Violino I "
-  \set Staff.instr = #"Vl. I "
+  \set Staff.instrumentName = #"Violino I "
+  \set Staff.shortInstrumentName = #"Vl. I "
 
   R1*7 c1\f R1*3
 }
 
 violinoII =  \relative c' {
   \set Staff.midiInstrument = #"violin"
-  \set Staff.instrument = #"Violino II "
-  \set Staff.instr = #"Vl. II "
+  \set Staff.instrumentName = #"Violino II "
+  \set Staff.shortInstrumentName = #"Vl. II "
  
   R1*8 c1\f R1*2
 }
 
 viola =  \relative c' {
   \set Staff.midiInstrument = #"viola"
-  \set Staff.instrument = #"Viola"
-  \set Staff.instr = #"Vla."
+  \set Staff.instrumentName = #"Viola"
+  \set Staff.shortInstrumentName = #"Vla."
 
   \clef alto
   R1*9 c1\f R1*1
@@ -107,8 +107,8 @@ viola =  \relative c' {
 violoncello =  \relative c' {
   \set Staff.midiInstrument = #"cello"
   %\set Staff.midiInstrument = #"contrabass"
-  \set Staff.instrument = #"Violoncello"
-  \set Staff.instr = #"Vc."
+  \set Staff.instrumentName = #"Violoncello"
+  \set Staff.shortInstrumentName = #"Vc."
   
   \clef bass
   R1*10 c1\f
@@ -153,9 +153,15 @@ violoncello =  \relative c' {
       \RemoveEmptyStaffContext
     }
   }
+  
   \midi {
-       \tempo 1 = 60
-  }
+    \context {
+      \Score
+      tempoWholesPerMinute = #(ly:make-moment 60 1)
+      }
+    }
+
+
 }
 
 
index c5a24aeb09fd351e09bbf0f1ee976f7dba2768e5..908514a56d390883756fc5cea57884dafd53d5f0 100644 (file)
@@ -7,7 +7,7 @@
 }
 
 
-\version "2.9.13"
+\version "2.9.16"
 
 drh = \drummode { cymc4.^"crash" hhc16^"h.h." hh \repeat "unfold" 5 {hhc8 hho hhc8 hh16 hh} hhc4 r4 r2 }
 drl = \drummode {\repeat "unfold" 3 {bd4 sn8 bd bd4 << bd ss >> } bd8 tommh tommh bd toml toml bd tomfh16 tomfh }
@@ -34,7 +34,15 @@ timb = \drummode { \repeat "unfold" 2 {timh4 ssh timl8 ssh r timh r4 ssh8 timl r
   \layout {}
 
   %% broken:
-  \midi{ \tempo 4=120 }
+  
+  \midi {
+    \context {
+      \Score
+      tempoWholesPerMinute = #(ly:make-moment 120 4)
+      }
+    }
+
+
 }
 
 
index e8bf64e0cb5c243706430466d67d048314c31cd4..e6b9efd2f8197d07d76c8366c438f20b1c8e8d56 100644 (file)
@@ -14,7 +14,7 @@ The marking is left aligned with the time signature, if there is one.
 
 \layout {  ragged-right = ##t }
 
-\version "2.7.39"
+\version "2.9.16"
 
 \relative c'' {
   \tempo \breve = 100 c1 c1 \tempo 8.. = 50 c1
index 4a617fce5f32632ee6a09c8bf06f98b53dcf3807..d178f2241e4a64304716caac0787371572c69569 100644 (file)
@@ -1,6 +1,6 @@
 %% sakura-sakura.ly
 
-\version "2.7.39"
+\version "2.9.16"
 
 
 \header {
     }
   >>
   \layout { }
-  \midi { \tempo 4=120 }
+  
+  \midi {
+    \context {
+      \Score
+      tempoWholesPerMinute = #(ly:make-moment 120 4)
+      }
+    }
+
+
   }
 
 %%% Local Variables:
index 71a54da3f226485b3724bebac03ba2ce19edad68..0cba000abd2008559d31cf01f398b7fa776c03cb 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.7.39"
+\version "2.9.16"
 
 % definitely wil be renamed to something.
 %{
index 9d8fe6fabde65d37d6f46fc323a2dd7462ff09c7..af8efd382b493fbe4fae78b7dc92dcc56ab59169 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.9.7"
+\version "2.9.16"
 \sourcefilename "music-box.ly"
 
 \include "deutsch.ly"
@@ -133,8 +133,14 @@ prelude =
        line-width = 18.0 \cm
    }
 
-   \midi {
-       \tempo 4 = 80
-   }
+   
+  \midi {
+    \context {
+      \Score
+      tempoWholesPerMinute = #(ly:make-moment 80 4)
+      }
+    }
+
+
 }
 
index 31495ac7c3845f4001b495a8c2a65c174a6fa67b..5a3e3419e1a01b121d722fdc410f28a92c3857d1 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.7.39"
+\version "2.9.16"
 
 \header {
 
index 8283c038604ce14cc1b6fd5c764fe108007207dd..5dd7d1bf58ed8bfcf2899632ca221d6789ce27c0 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.7.39"
+\version "2.9.16"
 
 \header {
 
index f9aa6baab2e16d1e8721d198ccd6297c85775034..089b36e355ed105820203cf4753e95d86e6d401f 100644 (file)
@@ -6,7 +6,7 @@
   used contemporary pieces with many time signature changes.  "
 
 }
-\version "2.7.39"
+\version "2.9.16"
 \layout {
   ragged-right =  ##T
 }
index e56612f84b78a2319d16b9313dbc886c886daea5..0683bced631241a4eb601486bd4dd7ad828464f0 100644 (file)
@@ -8,7 +8,7 @@ heavily mutilated Edition Peters Morgenlied by Schubert"
 
 }
 
-\version "2.9.13"
+\version "2.9.16"
 
 ignoreMelisma =        \set ignoreMelismata = ##t
 ignoreMelismaOff = \unset ignoreMelismata 
@@ -162,9 +162,15 @@ pianoLH =  \relative c'' \repeat volta 2\new Voice {
          \override VerticalAlignment #'forced-distance = #10
        }
       }
-      \midi {
-       \tempo 4 = 70
+      
+  \midi {
+    \context {
+      \Score
+      tempoWholesPerMinute = #(ly:make-moment 70 4)
       }
     }
+
+
+    }
   }
 
index c9dbb79f980f3c50b393b80135c7b2a4bcce1a96..52356a44d056839a683fb2e01398efd234e1a570 100644 (file)
@@ -694,6 +694,7 @@ score_body:
        }
        | SCORE_IDENTIFIER {
                $$ = unsmob_score ($1);
+               $$->protect ();
                $$->set_spot (@$);
        }
        | score_body object_id_setting {
index caaa39c704458bb0b532f0949bbfdb3adba2596c..2eee74626affcc534b0198bc0f93487fef81e59b 100644 (file)
@@ -9,8 +9,15 @@
 (define-public all-translation-properties '())
 
 (define (translator-property-description symbol type? description)
- (if (not (equal? #f (object-property symbol 'translation-doc)))
-     (ly:error (_ "symbol ~S redefined" symbol)))
+  (if (not (and
+           (symbol? symbol)
+           (procedure? type?)
+           (string? description)))
+      (throw 'init-format-error))
+          
+       
+  (if (not (equal? #f (object-property symbol 'translation-doc)))
+      (ly:error (_ "symbol ~S redefined" symbol)))
   
   (set-object-property! symbol 'translation-type? type?)
   (set-object-property! symbol 'translation-doc description)
@@ -472,9 +479,9 @@ Example:
 This will create a start-repeat bar in this staff only.
 Valid values are described in @internalsref{bar-line-interface}.
 ")
-     (tempoWholesPerMinute 'ly:moment? "The tempo in whole notes per minute.")
-     (tempoUnitDuration 'ly:duration? "Unit for specifying tempo.")
-     (tempoUnitCount 'number? "Count for specifying tempo.")
+     (tempoWholesPerMinute ,ly:moment? "The tempo in whole notes per minute.")
+     (tempoUnitDuration ,ly:duration? "Unit for specifying tempo.")
+     (tempoUnitCount ,number? "Count for specifying tempo.")
      
      )))