diff options
author | Han-Wen Nienhuys <hanwen@xs4all.nl> | 2006-08-08 17:17:31 +0000 |
---|---|---|
committer | Han-Wen Nienhuys <hanwen@xs4all.nl> | 2006-08-08 17:17:31 +0000 |
commit | 51e809e632a6edafd5e81b24208632664a91b176 (patch) | |
tree | 7d562f4108161406eb2a765173fbba6ad464f42a | |
parent | 60f7c5f91b9a375a20baaecfc904ad518253c0db (diff) |
(conv): better instrumentName conversion
rule.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | input/puer-fragment.ly | 4 | ||||
-rw-r--r-- | input/regression/alignment-vertical-spacing.ly | 6 | ||||
-rw-r--r-- | input/regression/bar-scripts.ly | 8 | ||||
-rw-r--r-- | input/regression/drums.ly | 6 | ||||
-rw-r--r-- | input/regression/instrument-name-hara-kiri.ly | 6 | ||||
-rw-r--r-- | input/regression/instrument-name-markup.ly | 6 | ||||
-rw-r--r-- | input/regression/instrument-name-partial.ly | 4 | ||||
-rw-r--r-- | input/regression/instrument-name.ly | 8 | ||||
-rw-r--r-- | input/regression/multi-measure-rest-instr-name.ly | 6 | ||||
-rw-r--r-- | input/regression/prefatory-spacing-matter.ly | 4 | ||||
-rw-r--r-- | input/regression/quote-during.ly | 8 | ||||
-rw-r--r-- | input/regression/quote-grace.ly | 6 | ||||
-rw-r--r-- | input/regression/quote.ly | 8 | ||||
-rw-r--r-- | input/regression/tag-filter.ly | 8 | ||||
-rw-r--r-- | input/regression/volta-broken-left-edge.ly | 6 | ||||
-rw-r--r-- | input/test/coriolan-margin.ly | 46 | ||||
-rw-r--r-- | input/test/instrument-name-grandstaff.ly | 8 | ||||
-rw-r--r-- | python/convertrules.py | 4 |
19 files changed, 81 insertions, 76 deletions
@@ -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 diff --git a/input/puer-fragment.ly b/input/puer-fragment.ly index 3f3c5aae27..0ffed32d83 100644 --- a/input/puer-fragment.ly +++ b/input/puer-fragment.ly @@ -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" " " { diff --git a/input/regression/alignment-vertical-spacing.ly b/input/regression/alignment-vertical-spacing.ly index f108d43e40..5d04f58203 100644 --- a/input/regression/alignment-vertical-spacing.ly +++ b/input/regression/alignment-vertical-spacing.ly @@ -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 diff --git a/input/regression/bar-scripts.ly b/input/regression/bar-scripts.ly index 37fcf6ddd2..353aa8bb53 100644 --- a/input/regression/bar-scripts.ly +++ b/input/regression/bar-scripts.ly @@ -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 } diff --git a/input/regression/drums.ly b/input/regression/drums.ly index df8f856451..c5a24aeb09 100644 --- a/input/regression/drums.ly +++ b/input/regression/drums.ly @@ -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 } >> diff --git a/input/regression/instrument-name-hara-kiri.ly b/input/regression/instrument-name-hara-kiri.ly index ffe99e696e..b7dd39dafa 100644 --- a/input/regression/instrument-name-hara-kiri.ly +++ b/input/regression/instrument-name-hara-kiri.ly @@ -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 } >> diff --git a/input/regression/instrument-name-markup.ly b/input/regression/instrument-name-markup.ly index f75de91267..f85066b599 100644 --- a/input/regression/instrument-name-markup.ly +++ b/input/regression/instrument-name-markup.ly @@ -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'' } } diff --git a/input/regression/instrument-name-partial.ly b/input/regression/instrument-name-partial.ly index 9a122d3d43..d6f2f70b04 100644 --- a/input/regression/instrument-name-partial.ly +++ b/input/regression/instrument-name-partial.ly @@ -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 } diff --git a/input/regression/instrument-name.ly b/input/regression/instrument-name.ly index 6d7b540a56..f5db7f49de 100644 --- a/input/regression/instrument-name.ly +++ b/input/regression/instrument-name.ly @@ -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 } >> diff --git a/input/regression/multi-measure-rest-instr-name.ly b/input/regression/multi-measure-rest-instr-name.ly index 49c37b1bfa..66c9e1fc6b 100644 --- a/input/regression/multi-measure-rest-instr-name.ly +++ b/input/regression/multi-measure-rest-instr-name.ly @@ -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 } >> diff --git a/input/regression/prefatory-spacing-matter.ly b/input/regression/prefatory-spacing-matter.ly index 983107b3b0..6020f0dbb6 100644 --- a/input/regression/prefatory-spacing-matter.ly +++ b/input/regression/prefatory-spacing-matter.ly @@ -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 diff --git a/input/regression/quote-during.ly b/input/regression/quote-during.ly index 43e855dad9..6803c3771e 100644 --- a/input/regression/quote-during.ly +++ b/input/regression/quote-during.ly @@ -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. } } diff --git a/input/regression/quote-grace.ly b/input/regression/quote-grace.ly index b0e426c53b..6e434702e4 100644 --- a/input/regression/quote-grace.ly +++ b/input/regression/quote-grace.ly @@ -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" diff --git a/input/regression/quote.ly b/input/regression/quote.ly index 8c4732520d..4c56a0a30e 100644 --- a/input/regression/quote.ly +++ b/input/regression/quote.ly @@ -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 { diff --git a/input/regression/tag-filter.ly b/input/regression/tag-filter.ly index 9aa03a8dc6..5e96e9ec87 100644 --- a/input/regression/tag-filter.ly +++ b/input/regression/tag-filter.ly @@ -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 } } diff --git a/input/regression/volta-broken-left-edge.ly b/input/regression/volta-broken-left-edge.ly index 944bad6fdb..01229f3893 100644 --- a/input/regression/volta-broken-left-edge.ly +++ b/input/regression/volta-broken-left-edge.ly @@ -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 diff --git a/input/test/coriolan-margin.ly b/input/test/coriolan-margin.ly index 8bfd8ce3aa..a950c3a3f6 100644 --- a/input/test/coriolan-margin.ly +++ b/input/test/coriolan-margin.ly @@ -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 } diff --git a/input/test/instrument-name-grandstaff.ly b/input/test/instrument-name-grandstaff.ly index e875d99ae6..004d79c844 100644 --- a/input/test/instrument-name-grandstaff.ly +++ b/input/test/instrument-name-grandstaff.ly @@ -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 { diff --git a/python/convertrules.py b/python/convertrules.py index 8023008962..c4f2bb18f5 100644 --- a/python/convertrules.py +++ b/python/convertrules.py @@ -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""")) |