--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 1.1 Partwise//EN"
+ "http://www.musicxml.org/dtds/partwise.dtd">
+<score-partwise version="1.1">
+ <identification>
+ <miscellaneous>
+ <miscellaneous-field name="description">An instrument change from one
+ transposition (Clarinet in Eb) to another transposing instrument
+ (Clarinet in Bb). The displayed instrument name should also be updated.
+
+ The whole piece is in Bb major (sounding), so first the key signature
+ should be one flat, after the change it should have no accidentals.
+ </miscellaneous-field>
+ </miscellaneous>
+ </identification>
+ <part-list>
+ <score-part id="P1">
+ <part-name>Clarinet in Eb</part-name>
+ <part-abbreviation>Eb Cl.</part-abbreviation>
+ </score-part>
+ </part-list>
+ <!--=========================================================-->
+ <part id="P1">
+ <measure number="1">
+ <attributes>
+ <divisions>1</divisions>
+ <key>
+ <fifths>1</fifths>
+ <mode>major</mode>
+ </key>
+ <time symbol="common">
+ <beats>4</beats>
+ <beat-type>4</beat-type>
+ </time>
+ <clef>
+ <sign>G</sign>
+ <line>2</line>
+ </clef>
+ <transpose>
+ <diatonic>2</diatonic>
+ <chromatic>3</chromatic>
+ </transpose>
+ </attributes>
+ <note>
+ <pitch>
+ <step>C</step>
+ <octave>4</octave>
+ </pitch>
+ <duration>4</duration>
+ <voice>1</voice>
+ <type>whole</type>
+ </note>
+ </measure>
+ <measure number="2">
+ <attributes>
+ <key>
+ <fifths>0</fifths>
+ <mode>major</mode>
+ </key>
+ <transpose>
+ <diatonic>-1</diatonic>
+ <chromatic>-2</chromatic>
+ </transpose>
+ </attributes>
+ <print>
+ <part-name-display><display-text>Clarinet in Bb</display-text></part-name-display>
+ <part-abbreviation-display><display-text>Bb Cl.</display-text></part-abbreviation-display>
+ </print>
+ <note>
+ <pitch>
+ <step>C</step>
+ <octave>4</octave>
+ </pitch>
+ <duration>4</duration>
+ <voice>1</voice>
+ <type>whole</type>
+ </note>
+ </measure>
+ <measure number="3">
+ <print new-system="yes" />
+ <note>
+ <pitch>
+ <step>C</step>
+ <octave>4</octave>
+ </pitch>
+ <duration>4</duration>
+ <voice>1</voice>
+ <type>whole</type>
+ </note>
+ <barline location="right">
+ <bar-style>light-heavy</bar-style>
+ </barline>
+ </measure>
+ </part>
+ <!--=========================================================-->
+</score-partwise>
else:
return ''
+class SetEvent (Music):
+ def __init__ (self, contextprop, value):
+ Music.__init__ (self)
+ self.context_prop = contextprop
+ self.value = value
+ def ly_expression (self):
+ if self.value:
+ return "\\set %s = %s" % (self.context_prop, self.value)
+ else:
+ return ''
class TempoMark (Music):
def __init__ (self):
val = getattr (el, "new-page")
if (val == "yes"):
elts.append (musicexp.Break ("pageBreak"))
+ child = el.get_maybe_exist_named_child ("part-name-display")
+ if child:
+ elts.append (musicexp.SetEvent ("Staff.instrumentName",
+ "\"%s\"" % extract_display_text (child)))
+ child = el.get_maybe_exist_named_child ("part-abbreviation-display")
+ if child:
+ elts.append (musicexp.SetEvent ("Staff.shortInstrumentName",
+ "\"%s\"" % extract_display_text (child)))
return elts