]> git.donarmstrong.com Git - lilypond.git/commitdiff
(conv): better instrumentName conversion
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 8 Aug 2006 17:17:31 +0000 (17:17 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 8 Aug 2006 17:17:31 +0000 (17:17 +0000)
rule.

19 files changed:
ChangeLog
input/puer-fragment.ly
input/regression/alignment-vertical-spacing.ly
input/regression/bar-scripts.ly
input/regression/drums.ly
input/regression/instrument-name-hara-kiri.ly
input/regression/instrument-name-markup.ly
input/regression/instrument-name-partial.ly
input/regression/instrument-name.ly
input/regression/multi-measure-rest-instr-name.ly
input/regression/prefatory-spacing-matter.ly
input/regression/quote-during.ly
input/regression/quote-grace.ly
input/regression/quote.ly
input/regression/tag-filter.ly
input/regression/volta-broken-left-edge.ly
input/test/coriolan-margin.ly
input/test/instrument-name-grandstaff.ly
python/convertrules.py

index 70b2426249d3e7ff9b2b1d84a03194f090567c4e..b18c6c3e5445f6b3597e5327b460688440e5f9f0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2006-08-08  Han-Wen Nienhuys  <hanwen@lilypond.org>
 
+       * input/regression/*.ly: apply it.
+
+       * python/convertrules.py (conv): better instrumentName conversion
+       rule.
+
        * scm/define-music-types.scm (music-descriptions): add
        line-break-event to LineBreakEvent music
 
index 3f3c5aae27a2d567d94e8a59770bc580745669a3..0ffed32d832c74e8c4cc8d64db87195674351a50 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.7.39"
+\version "2.9.13"
 \header {
     title      = "Puer natus est nobis"
     subtitle   = "Antiphona ad introitum VII"
@@ -24,7 +24,7 @@ ligature (not demonstrated in this example)."
 %%% global search/replace operations in emacs).
 
 cantus = \new VaticanaVoice = "cantus"  {
-  \set Staff.instrument = \markup {
+  \set Staff.instrumentName = \markup {
     \column {
       " " " " " " " " "VII" " "
       {
index f108d43e40a89d2a8fd3417f5194b498b64a0146..5d04f582036d98e8c86a51aab9649c0494c78d9b 100644 (file)
@@ -16,7 +16,7 @@ setting properties on individual object. @code{\override} in a
 
 }
 
-\version "2.7.39"
+\version "2.9.13"
 
 #(set-global-staff-size 13)
 
@@ -29,8 +29,8 @@ setting properties on individual object. @code{\override} in a
   \new Staff { c1 c c }
   \new PianoStaff <<
     \new Voice  {
-      \set PianoStaff.instrument = #"piano"
-      \set PianoStaff.instr = #"pn"
+      \set PianoStaff.instrumentName = #"piano"
+      \set PianoStaff.shortInstrumentName = #"pn"
       c1_"normal"
       
       \overrideProperty
index 37fcf6ddd2c20d33cc6c57f69fafe8cf31c60519..353aa8bb535a062fdda08165e0997897327d4178 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.7.39"
+\version "2.9.13"
 \header{
 texidoc="
 
@@ -9,8 +9,8 @@ Markings can be attached to (invisible) barlines.
 \layout { ragged-right = ##t }
 
 onestaff = \new Staff\relative c''  {
-       \set Staff.instr = instr
-       \set Staff.instrument = instrument \mark "B"
+       \set Staff.shortInstrumentName = instr
+       \set Staff.instrumentName = instrument \mark "B"
         c1 \mark "A" \break c2  c2 \break
 }
 
@@ -18,7 +18,7 @@ grstaff =  \relative c''
 \context GrandStaff <<
        \new Staff {
 
-       \set Staff.instr = instr
+       \set Staff.shortInstrumentName = instr
        
         \mark "B" \break c1 \mark "A" c2  }
        \new Staff { c1 c2  }
index df8f856451536c54f92906ccd654dbb1fd138a06..c5a24aeb09fd351e09bbf0f1ee976f7dba2768e5 100644 (file)
@@ -7,7 +7,7 @@
 }
 
 
-\version "2.7.39"
+\version "2.9.13"
 
 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 }
@@ -21,11 +21,11 @@ timb = \drummode { \repeat "unfold" 2 {timh4 ssh timl8 ssh r timh r4 ssh8 timl r
        \override StaffSymbol #'line-count = #2
        \override BarLine #'bar-size = #2
       } <<
-       \set Staff.instrument = "timbales"
+       \set Staff.instrumentName = "timbales"
        \timb
       >>
       \new DrumStaff <<
-       \set Staff.instrument = "drums"
+       \set Staff.instrumentName = "drums"
        \new DrumVoice {\stemUp \drh }
        \new DrumVoice {\stemDown \drl }
       >>
index ffe99e696e03dfcb08e8d5e1ec2e7f840acb0688..b7dd39dafad8d9a2f8895c92e043497f5ef3d359 100644 (file)
@@ -9,13 +9,13 @@ as does the instrument name.  "
 
 }
 
-\version "2.7.39"
+\version "2.9.13"
         
   \new PianoStaff <<
     \new Staff {
       \override Staff.VerticalAxisGroup #'remove-empty = ##t  
-      \set PianoStaff.instrument="up" 
-      \set PianoStaff.instr="u"
+      \set PianoStaff.instrumentName ="up" 
+      \set PianoStaff.shortInstrumentName ="u"
       c'1\break R
     }
   >>
index f75de91267569663522d51fd4ff72145158abbd9..f85066b599abe0b0cd28becef039aafb459edfe1 100644 (file)
@@ -9,13 +9,13 @@ including alterations. "
 
 \layout { ragged-right = ##t }
 
-\version "2.7.39"
+\version "2.9.13"
 
 textFlat = \markup {\smaller \flat}
 
 \new Staff {
-  \set Staff.instrument = \markup { \column { "Clarinetti" \line { "in B" \textFlat } } }
-  \set Staff.instr = \markup { \smaller  { "Cl(B" \textFlat ")" } }
+  \set Staff.instrumentName = \markup { \column { "Clarinetti" \line { "in B" \textFlat } } }
+  \set Staff.shortInstrumentName = \markup { \smaller  { "Cl(B" \textFlat ")" } }
 
   { c''1 \break c'' }
 }
index 9a122d3d433b7af4fa3061148cc67c4b8993ba45..d6f2f70b04837497cd7bf5323bd2992c868e6a80 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.7.39"
+\version "2.9.13"
 \header {
   texidoc = "Instrument names are also printed on  partial starting measures."
 }
@@ -8,7 +8,7 @@
 
 
 
-\relative c'' { \set Staff.instrument = "foo" \partial 4 c4 c1 }
+\relative c'' { \set Staff.instrumentName = "foo" \partial 4 c4 c1 }
 
 
 
index 6d7b540a56763d38d8fc1de48dba624ffcd7bbdb..f5db7f49de376b0e49673b8e30bcf3af7dfde37d 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.7.39"
+\version "2.9.13"
 \header{
   texidoc="
 Staff margins are also markings attached to barlines.  They should be
@@ -20,10 +20,10 @@ PianoStaff.
 \new StaffGroup <<
   \context PianoStaff <<
     \new Staff    {
-      \set PianoStaff.instrument = "Piano"
-      \set Staff.instrument = "Right" { c''4 }}
+      \set PianoStaff.instrumentName = "Piano"
+      \set Staff.instrumentName = "Right" { c''4 }}
     \new Staff {
-      \set Staff.instrument = "Left"
+      \set Staff.instrumentName = "Left"
       \clef bass c4
     }
   >>
index 49c37b1bfa02d3fa451e8f21eed349918655d7ae..66c9e1fc6bf9228e67cdade5e61373b9210e6fa9 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.7.39"
+\version "2.9.13"
 \header {
 
   texidoc = "There are both long and short instrument names.
@@ -18,7 +18,7 @@ multimeasure rests. "
 
 
 \context Staff <<
-  \set Staff.instrument = "instrument"
-  \set Staff.instr = "instr"
+  \set Staff.instrumentName = "instrument"
+  \set Staff.shortInstrumentName = "instr"
   {c''1 \break R1 }
 >>
index 983107b3b056ca2708177a06ee1db899c9bc86fa..6020f0dbb67d0c30bb06b4129a0d7ac809902d80 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.7.39"
+\version "2.9.13"
 \header {
 
   texidoc = "Distances between prefatory items (e.g. clef, bar,
@@ -15,7 +15,7 @@ bar-line is different from the start of line.
 }
 
 \relative c'' {
-  \set Staff.instrument = "fobar"
+  \set Staff.instrumentName = "fobar"
   \bar "||:"
   \key cis \major
   cis4 cis4 cis4 cis4 \clef bass  cis,1
index 43e855dad9d98f199bef6e91add7d4d07f5c305e..6803c3771e9b792220c1558f005a258a1a19ad28 100644 (file)
@@ -8,7 +8,7 @@ quoted. In this example, a 16th rests is not quoted, since
 @code{rest-event} is not in @code{quotedEventTypes}."
 
 }
-\version "2.7.39"
+\version "2.9.13"
 \layout {
     ragged-right = ##t
 }
@@ -21,16 +21,16 @@ original = \relative c'' { c8 d s2 es8 gis8 }
 
 <<
     \new Staff {
-       \set Staff.instrument = "quoteMe"
+       \set Staff.instrumentName = "quoteMe"
        \quoteMe
     }
     \new Staff {
-       \set Staff.instrument = "orig"
+       \set Staff.instrumentName = "orig"
        \original
     }
     \new Staff \relative c'' <<
        
-       \set Staff.instrument = "orig+quote"    
+       \set Staff.instrumentName = "orig+quote"        
        \set Staff.quotedEventTypes = #'(note-event articulation-event)
        \original
        { s4 \quoteDuring #"quoteMe" { s2. } }
index b0e426c53bc743a611a06be43c0b371c258535c1..6e434702e446a851dbecd1f9f5befb14ea6f6f68 100644 (file)
@@ -7,7 +7,7 @@
 }
 \paper { ragged-right= ##t }
 
-\version "2.7.39"
+\version "2.9.13"
 quoted = \relative c'' {
   R1
   \grace g16 f4 \grace a16 bes4 \grace b16 c4 c4
@@ -18,11 +18,11 @@ quoted = \relative c'' {
 
 <<
   \new Staff {
-    \set Staff.instrument = "quoted"
+    \set Staff.instrumentName = "quoted"
     \quoted
     }
   \new Staff \new Voice \relative c'' {
-    \set Staff.instrument = "quoted"
+    \set Staff.instrumentName = "quoted"
     R1
     \cueDuring #"quoted" #1  { \grace s16. r2 }
     c2^"original"
index 8c4732520d780ef7ac8a2129c20468f47c91e80e..4c56a0a30e7c631961d5bb32df4ad6ab7e0f3572 100644 (file)
@@ -7,7 +7,7 @@ things are quoted. In this example, a 16th rests is not quoted, since
 @code{rest-event} is not in @code{quotedEventTypes}."
 
 }
-\version "2.7.39"
+\version "2.9.13"
 \layout {
     ragged-right = ##t
 }
@@ -20,15 +20,15 @@ original = \relative c'' { c8 d s2 es8 gis8 }
 
 <<
     \new Staff {
-       \set Staff.instrument = "quoteMe"
+       \set Staff.instrumentName = "quoteMe"
        \quoteMe
     }
     \new Staff {
-       \set Staff.instrument = "orig"
+       \set Staff.instrumentName = "orig"
        \original
     }
     \new Staff \relative c'' <<
-       \set Staff.instrument = "orig+quote"    
+       \set Staff.instrumentName = "orig+quote"        
        \set Staff.quotedEventTypes = #'(note-event articulation-event)
        \original
        \new Voice {
index 9aa03a8dc6ed1ddf0ab11e084bd3cc6e9dcaf245..5e96e9ec8704324dd14fbe6f9fe19064f408248f 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.7.39"
+\version "2.9.13"
 \header {
 
   texidoc = "The @code{\\tag} command marks music expressions with a
@@ -33,15 +33,15 @@ common =
 
 \simultaneous { 
   \new Staff {
-    \set Staff.instrument = #"both"
+    \set Staff.instrumentName = #"both"
     \common
   }
   \new Staff {
-    \set Staff.instrument = #"part"
+    \set Staff.instrumentName = #"part"
     \keepWithTag #'part \common
   }
   \new Staff {
-    \set Staff.instrument = #"score"
+    \set Staff.instrumentName = #"score"
     \keepWithTag #'score \common
   }
 }
index 944bad6fdbd14e27170638b9acaa4d8c3d385a55..01229f3893ce503974a34ea79aa296e08f3ea1c5 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.7.39"
+\version "2.9.13"
 
 \header {
   texidoc ="Broken volta spanners behave correctly at their left edge in all cases."
@@ -43,8 +43,8 @@ Bar 23        Perfect
 
 voiceB =  {
   \clef bass
-  \set Staff.instrument = "Bass"
-  \set Staff.instr = "B"
+  \set Staff.instrumentName = "Bass"
+  \set Staff.shortInstrumentName = "B"
   \key f \minor 
   \time 4/4  
   f1
index 8bfd8ce3aa828b03413f5652a1389425a5e44c06..a950c3a3f6beca94d06640c0ec23b3e358bc8308 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.7.39"
+\version "2.9.13"
 
 
 % Ugh, we need to override some LaTeX titling stuff
@@ -25,8 +25,8 @@ raisedFlat = \markup { \raise #0.4 \smaller \smaller \flat  }
 
 
 flauti =  \relative c' {
-  \set Staff.instrument = #"2 Flauti"
-  \set Staff.instr = #"Fl."
+  \set Staff.instrumentName = #"2 Flauti"
+  \set Staff.shortInstrumentName = #"Fl."
   \time 4/4
   c1 
   \break c
@@ -36,67 +36,67 @@ flauti =  \relative c' {
 }
 
 oboi =  \relative c' {
-  \set Staff.instrument = #"2 Oboi"
-  \set Staff.instr = #"Ob."
+  \set Staff.instrumentName = #"2 Oboi"
+  \set Staff.shortInstrumentName = #"Ob."
   c1 c
 }
 
 clarinetti =  \relative c' {
-    \set Staff.instrument = \markup { \column { "Clarinetti" \line { "in B" \raisedFlat } } }
-    \set Staff.instr = \markup { \smaller  { "Cl(B" \raisedFlat ")" } }
+    \set Staff.instrumentName = \markup { \column { "Clarinetti" \line { "in B" \raisedFlat } } }
+    \set Staff.shortInstrumentName = \markup { \smaller  { "Cl(B" \raisedFlat ")" } }
 
   c1 c
 }
 
 fagotti =  \relative c' {
-  \set Staff.instrument = #"2 Fagotti"
-  \set Staff.instr = #"Fg."
+  \set Staff.instrumentName = #"2 Fagotti"
+  \set Staff.shortInstrumentName = #"Fg."
   c1 c
 }
 
 corni =  \relative c' {
-    \set Staff.instrument = \markup { \column { "Corni" \line { "in E" \raisedFlat } } }
-    \set Staff.instr = \markup { \smaller  { "Cor(E" \raisedFlat ")" } }
+    \set Staff.instrumentName = \markup { \column { "Corni" \line { "in E" \raisedFlat } } }
+    \set Staff.shortInstrumentName = \markup { \smaller  { "Cor(E" \raisedFlat ")" } }
 
   c1 c
 }
 
 trombe =  \relative c' {
-  \set Staff.instrument = \markup \column { "2 Trombe" "(C)" }
-  \set Staff.instr = \markup \column {  "Tbe." "(C)" }
+  \set Staff.instrumentName = \markup \column { "2 Trombe" "(C)" }
+  \set Staff.shortInstrumentName = \markup \column {  "Tbe." "(C)" }
 
   c1 c
 }
 
 timpani =  \relative c' {
-  \set Staff.instrument = \markup \column { "Timpani" "(C-G)" }
-  \set Staff.instr = #"Timp."
+  \set Staff.instrumentName = \markup \column { "Timpani" "(C-G)" }
+  \set Staff.shortInstrumentName = #"Timp."
 
   c1 c
 }
 
 violinoI =  \relative c' {
-  \set Staff.instrument = #"Violino I  "
-  \set Staff.instr = #"Vl. I  "
+  \set Staff.instrumentName = #"Violino I  "
+  \set Staff.shortInstrumentName = #"Vl. I  "
   c1 c
 }
 
 violinoII =  \relative c' {
-  \set Staff.instrument = #"Violino II  "
-  \set Staff.instr = #"Vl. II  "
+  \set Staff.instrumentName = #"Violino II  "
+  \set Staff.shortInstrumentName = #"Vl. II  "
   c1 c
 }
 
 viola =  \relative c' {
-  \set Staff.instrument = #"Viola"
-  \set Staff.instr = #"Vla."
+  \set Staff.instrumentName = #"Viola"
+  \set Staff.shortInstrumentName = #"Vla."
   c1 c 
   %c
 }
 
 violoncello =  \relative c' {
-  \set Staff.instrument = \markup \column { "Violoncello" "e" "Contrabasso" }
-  \set Staff.instr = \markup \column {  "Vc." "Cb." }
+  \set Staff.instrumentName = \markup \column { "Violoncello" "e" "Contrabasso" }
+  \set Staff.shortInstrumentName = \markup \column {  "Vc." "Cb." }
   c1 c
 }
 
index e875d99ae62af6d69a2ee8d06747bd7fbf0e8fd9..004d79c84403da251c13f646024a72e61c8b7c53 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.7.39"
+\version "2.9.13"
 \header { texidoc = "@cindex Instrument Name Grandstaff
 You can have a name for the whole @code{GrandStaff} in addition to 
 individual @code{Staff}s. " }
@@ -7,9 +7,9 @@ individual @code{Staff}s. " }
   
    \new GrandStaff <<
     \new Staff =  "treble"    {
-      \set GrandStaff.instrument = "Violini  "
-      \set Staff.instrument = " vn I" { c''4 }}
-    \new Staff =  "bass" { \set Staff.instrument = " vn II" c''4 }>>
+      \set GrandStaff.instrumentName = "Violini  "
+      \set Staff.instrumentName = " vn I" { c''4 }}
+    \new Staff =  "bass" { \set Staff.instrumentName = " vn II" c''4 }>>
 
 
 \layout {
index 8023008962ee46af12db4b5b708a9611a815dddf..c4f2bb18f5e2e0b8d7bb640d7f9fa82eaaa12cdc 100644 (file)
@@ -2826,8 +2826,8 @@ conversions.append (((2, 9, 11), conv, """\\set tupletNumberFormatFunction -> \\
 
 def conv (str):
     str = re.sub ('vocNam', 'shortVocalName', str)
-    str = re.sub (r'([^a-z])instr\s*=', r'\1shortInstrumentName =', str)
-    str = re.sub (r'([^a-z])instrument\s*=', r'\1instrumentName =', str)
+    str = re.sub (r'\.instr\s*=', r'.shortInstrumentName =', str)
+    str = re.sub (r'\.instrument\s*=', r'.instrumentName =', str)
     return str
 
 conversions.append (((2, 9, 13), conv, """instrument -> instrumentName, instr -> shortInstrumentName, vocNam -> shortVocalName"""))