.. _musicxmlTest: .. WARNING: DO NOT EDIT THIS FILE: AUTOMATICALLY GENERATED. PLEASE EDIT THE .py FILE DIRECTLY. Unofficial MusicXML Test Suite ============================== (based on Lilypond Test Suite) .. code:: ipython3 from music21 import * print(musicxml.lilypondTestSuite.__doc__) .. parsed-literal:: :class: ipython-result The Lilypond MusicXML Test Suite comes from https://github.com/cuthbertLab/musicxmlTestSuite and is a fork of http://lilypond.org/doc/v2.18/input/regression/musicxml/collated-files The test suite is licensed under the MIT license (https://opensource.org/license/mit/) and copyrighted by the Lilypond project. .. code:: ipython3 import os import re import pathlib allF = musicxml.lilypondTestSuite.allFiles() untested = [f.name for f in sorted(allF)] scores = {} musicxmlOut = {} def s(i): if isinstance(i, int): longFp = allF[i] else: for longFp in allF: shortFp = longFp.name if i in shortFp: break else: raise FileNotFoundError("Cannot find: " + str(i)) shortFp = longFp.name if shortFp in untested: untested.remove(shortFp) sc = converter.parse(longFp, forceSource=True) scores[i] = sc fp = pathlib.Path(sc.metadata.filePath).name print(fp + '\n') desc = sc.metadata.description desc = re.sub(r'\s+', ' ', desc) print(desc) fpOut = sc.write('musicxml') with open(fpOut, 'r') as musicxmlOutFile: allOut = musicxmlOutFile.read() musicxmlOut[i] = allOut return sc.show() 01 … Pitches ------------ .. code:: ipython3 s('01a') .. parsed-literal:: :class: ipython-result 01a-Pitches-Pitches.xml All pitches from G to c'''' in ascending steps; First without accidentals, then with a sharp and then with a flat accidental, then with explicit natural accidentals. Double alterations and cautionary accidentals are tested at the end. .. image:: musicxmlTest_4_1.png :width: 708px :height: 680px .. code:: ipython3 s('01b') .. parsed-literal:: :class: ipython-result 01b-Pitches-Intervals.xml All pitch intervals in ascending jump size. .. image:: musicxmlTest_5_1.png :width: 708px :height: 574px .. code:: ipython3 s('01c') .. parsed-literal:: :class: ipython-result 01c-Pitches-NoVoiceElement.xml The element of notes is optional in MusicXML (although Dolet always writes it out). Here, there is one note with lyrics, but without a voice assigned. It should still be correctly converted. .. image:: musicxmlTest_6_1.png :width: 553px :height: 165px .. code:: ipython3 s('01d') .. parsed-literal:: :class: ipython-result 01d-Pitches-Microtones.xml Some microtones: c flat-and-a-half, d half-flat, e half-sharp, f sharp-and-a half. Once in the lower and once in the upper region of the staff. .. image:: musicxmlTest_7_1.png :width: 674px :height: 156px .. code:: ipython3 s('01e') # no visual distinctions are necessary .. parsed-literal:: :class: ipython-result 01e-Pitches-EditorialCautionaryAccidentals.xml Accidentals can be cautionary or editorial. Each measure has a normal accidental, an editorial, a cautionary and an editorial and cautionary accidental. These do not need to be graphically distinguished in later XML Versions. .. image:: musicxmlTest_8_1.png :width: 695px :height: 160px .. code:: ipython3 s('01ea') # only parentheses supported by m21 or MuseScore/Finale .. parsed-literal:: :class: ipython-result 01ea-Pitches-Parenthesis-Changed-Accidentals.xml Accidentals have styling attributes. The first measure's accidentals should be normal, parenthesized, bracketed, and praenthesized-and-bracketed. Measure 2 has the sharp shifted to the right of the note, while Measure 3 has the sharp shifted above the note. Measure 4 should have a red accidental. Measure 5 and 6 should have a large accidental, created using the size and font-size attributes respectively. .. image:: musicxmlTest_9_1.png :width: 727px :height: 160px .. code:: ipython3 s('01f') # no visual distinctions are necessary .. parsed-literal:: :class: ipython-result 01f-Pitches-EditorialMicrotoneAccidentals.xml Microtone accidentals can be cautionary or editorial. Each measure has a normal accidental, an editorial, a cautionary and an editorial and cautionary accidental. No visual distinctions are necessary .. image:: musicxmlTest_10_1.png :width: 683px :height: 160px 02 … Rests ---------- .. code:: ipython3 s('02a') .. parsed-literal:: :class: ipython-result 02a-Rests-Durations.xml All different rest lengths: A two-bar multi-measure rest, a whole rest, a half, etc. until a 128th-rest; Then the same with dotted durations. .. image:: musicxmlTest_12_1.png :width: 674px :height: 156px .. code:: ipython3 s('02b') .. parsed-literal:: :class: ipython-result 02b-Rests-PitchedRests.xml Rests can have explicit pitches, where they are displayed. The first rest uses no explicit position and should use the default position, all others are explicitly positioned somewhere else. .. image:: musicxmlTest_13_1.png :width: 516px :height: 167px .. code:: ipython3 s('02c') .. parsed-literal:: :class: ipython-result 02c-Rests-MultiMeasureRests.xml Four multi-measure rests: 3 measures, 15 measures, 1 measure, and 12 measures. .. image:: musicxmlTest_14_1.png :width: 674px :height: 156px .. code:: ipython3 s('02d') .. parsed-literal:: :class: ipython-result 02d-Rests-Multimeasure-TimeSignatures.xml Multi-Measure rests should always be converted into durations that are a multiple of the time signature. .. image:: musicxmlTest_15_1.png :width: 677px :height: 156px .. code:: ipython3 s('02e') .. parsed-literal:: :class: ipython-result 02e-Rests-NoType.xml In some cases, a rest might not have its type attribute set (this happens, for example, with voices in Finale, where you don't manually insert a rest). .. image:: musicxmlTest_16_1.png :width: 477px :height: 226px 03 … Rhythm ----------- .. code:: ipython3 s('03aa') .. parsed-literal:: :class: ipython-result 03aa-Rhythm-Durations.xml All common note durations, from brevis, whole until 64th; First with their plain values, then dotted and finally doubly-dotted (to 32nd). .. image:: musicxmlTest_18_1.png :width: 708px :height: 418px .. code:: ipython3 s('03ab') .. parsed-literal:: :class: ipython-result 03ab-Rhythm-Durations.xml Extreme note durations (pre 3.0): long and 128th; First with their plain values, then dotted and finally doubly-dotted. .. image:: musicxmlTest_19_1.png :width: 674px :height: 170px .. code:: ipython3 s('03b') # music21 creates a Rest w/ hideObjectOnPrint in this case. .. parsed-literal:: :class: ipython-result 03b-Rhythm-Backup.xml Two voices with a backup, that does not jump to the beginning for the measure for voice 2, but somewhere in the middle. Voice 2 thus won't have any notes or rests for the first beat of the measures. .. image:: musicxmlTest_20_1.png :width: 496px :height: 174px .. code:: ipython3 s('03c') .. parsed-literal:: :class: ipython-result 03c-Rhythm-DivisionChange.xml Although uncommon, the divisions of a quarter note can change somewhere in the middle of a MusicXML file. Here, the first half measure uses a division of 1, which then changes to 8 in the middle of the first measure and to 38 in the middle of the second measure. .. image:: musicxmlTest_21_1.png :width: 553px :height: 156px .. code:: ipython3 s('03d') # failing on not recognizing a way around 5/16, 9/8 .. parsed-literal:: :class: ipython-result 03d-Rhythm-DottedDurations-Factors.xml Several durations can be written with dots. For multimeasure rests, we can also have durations that cannot be expressed with dotted notes (5/16 and 9/8). .. image:: musicxmlTest_22_1.png :width: 708px :height: 287px .. code:: ipython3 scores['03d'].show('text') # import is fine. .. parsed-literal:: :class: ipython-result {0.0} {0.0} {0.0} {0.0} {0.0} {0.0} {0.0} {0.0} {0.0} {0.0} {0.0} {0.0} {0.0} {0.0} {0.5} {0.0} {1.0} {0.0} {0.0} {2.0} {0.0} {3.0} {0.0} {0.0} {6.0} {0.0} {9.0} {0.0} {0.0} {13.0} {0.0} {17.0} {0.0} {0.0} {1.0} {18.25} {0.0} {19.5} {0.0} {0.0} {23.0} {0.0} {26.5} {0.0} {0.0} {4.0} {31.0} {0.0} {35.5} {0.0} {0.0} {51.0} {0.0} {66.5} {0.0} {0.0} 11 … Time signatures -------------------- .. code:: ipython3 s('11a') .. parsed-literal:: :class: ipython-result 11a-TimeSignatures.xml Various time signatures: 2/2 (alla breve), 4/4 (C), 2/2, 3/2, 2/4, 3/4, 4/4, 5/4, 3/8, 6/8, 12/8 .. image:: musicxmlTest_25_1.png :width: 674px :height: 156px .. code:: ipython3 s('11b') .. parsed-literal:: :class: ipython-result 11b-TimeSignatures-NoTime.xml A score without a time signature (but with a key and clefs) .. image:: musicxmlTest_26_1.png :width: 553px :height: 217px .. code:: ipython3 s('11c') .. parsed-literal:: :class: ipython-result 11c-TimeSignatures-CompoundSimple.xml Compound time signatures with same denominator: (3+2)/8 and (5+3+1)/4. .. image:: musicxmlTest_27_1.png :width: 674px :height: 156px .. code:: ipython3 s('11d') # blocking: MuseScore. Finale OK .. parsed-literal:: :class: ipython-result 11d-TimeSignatures-CompoundMultiple.xml Compound time signatures with separate fractions displayed: 3/8+2/8+3/4 and 5/2+1/8. .. image:: musicxmlTest_28_1.png :width: 674px :height: 156px .. code:: ipython3 for m in scores['11d'].recurse().getElementsByClass('TimeSignature'): print(m, m.displaySequence.flat) .. parsed-literal:: :class: ipython-result {3/8+2/8+3/4} {5/2+1/8} .. code:: ipython3 s('11e') # blocking: MuseScore, Finale OK .. parsed-literal:: :class: ipython-result 11e-TimeSignatures-CompoundMixed.xml Compound time signatures of mixed type: (3+2)/8+3/4. .. image:: musicxmlTest_30_1.png :width: 617px :height: 156px .. code:: ipython3 s('11f') # acceptable though different meaning from Lilypond .. parsed-literal:: :class: ipython-result 11f-TimeSignatures-SymbolMeaning.xml A time signature of 3/8 with the symbol="cut" attribute and two symbol="single-number" attributes with compound time signatures. Shall the symbol be ignored in this case? .. image:: musicxmlTest_31_1.png :width: 609px :height: 156px .. code:: ipython3 s('11g') # block: MuseScore .. parsed-literal:: :class: ipython-result 11g-TimeSignatures-SingleNumber.xml Time signature displayed as a single number. .. image:: musicxmlTest_32_1.png :width: 600px :height: 156px .. code:: ipython3 ts = scores['11g'].recurse().getElementsByClass('TimeSignature')[0] ts.symbol .. parsed-literal:: :class: ipython-result 'single-number' .. code:: ipython3 s('11h') .. parsed-literal:: :class: ipython-result 11h-TimeSignatures-SenzaMisura.xml Senza-misura time signature .. image:: musicxmlTest_34_1.png :width: 592px :height: 156px .. code:: ipython3 sc = scores['11h'] sc.recurse().getElementsByClass('SenzaMisuraTimeSignature')[0] .. parsed-literal:: :class: ipython-result 12 … Clefs ---------- .. code:: ipython3 s('12aa') .. parsed-literal:: :class: ipython-result 12aa-Clefs_Pitch_Traditional.xml Four traditional clefs: G-treble, C-alto, C-tenor, F-bass .. image:: musicxmlTest_37_1.png :width: 674px :height: 156px .. code:: ipython3 s('12ab') .. parsed-literal:: :class: ipython-result 12ab-Clefs-Percussion-NonTrad.xml Clefs with octave shifts, clefs on staff lines other than default, and percussion. Order: Percussion, treble 8vb, bass 8vb, F3, G1, C5, C2, C1, treble 8va, bass 8va, .. image:: musicxmlTest_38_1.png :width: 674px :height: 179px .. code:: ipython3 s('12ac') # block: MuseScore .. parsed-literal:: :class: ipython-result 12ac-Clefs-TAB-Switch.xml none clef, TAB clef, Treble .. image:: musicxmlTest_39_1.png :width: 512px :height: 232px .. code:: ipython3 s('12ad') # block: MuseScore on treble 15vb, treble 22va, bass 22vb. .. parsed-literal:: :class: ipython-result 12ad-Clefs-Extreme-Octave.xml Clefs with abs(octave shifts) > 1 Order: treble 15vb (C2), bass 15vb (C2), treble 15va (C6), bass 15va (C6), treble 22va (C7), bass 22vb (C1). Should all display as middle C if clef octavation is ignored .. image:: musicxmlTest_40_1.png :width: 674px :height: 227px .. code:: ipython3 s('12b') .. parsed-literal:: :class: ipython-result 12b-Clefs-NoKeyOrClef.xml A score without any key or clef defined. The default (4/4 in treble clef) should be used. .. image:: musicxmlTest_41_1.png :width: 515px :height: 156px 13 … Key signatures ------------------- .. code:: ipython3 s('13a') .. parsed-literal:: :class: ipython-result 13a-KeySignatures.xml Various standard key signatures: from 7 flats to 7 sharps (each one first one measure in major, then one measure in minor) .. image:: musicxmlTest_43_1.png :width: 708px :height: 422px .. code:: ipython3 s('13aa') # blocked: MuseScore and Finale (on flats; sharps import fine) .. parsed-literal:: :class: ipython-result 13aa-KeySignatures-Extreme.xml Various extreme key signatures: from 11 flats to 7 flats and 7 sharps to 11 sharps (all marked as major) .. image:: musicxmlTest_44_1.png :width: 674px :height: 160px .. code:: ipython3 print([ks.sharps for ks in scores['13aa'].recurse().getElementsByClass('KeySignature')]) .. parsed-literal:: :class: ipython-result [-11, -10, -9, -8, -7, 7, 8, 9, 10, 11] .. code:: ipython3 s('13ab') # no music21 support; blocked MuseScore .. parsed-literal:: :class: ipython-result 13ab-KeySignatures-Cancel.xml Tests of key signature cancelation, at default location, at right, and before-barline, then cancelling a key signature that does not exist... .. image:: musicxmlTest_46_1.png :width: 674px :height: 160px .. code:: ipython3 s('13ac') # no music21 support; blocked MuseScore + Finale .. parsed-literal:: :class: ipython-result 13ac-KeySignatures-Octaves.xml Three tests of key signatures at octaves other than defaults. The third example uses the cancel element to cancel previous key signature octaves .. image:: musicxmlTest_47_1.png :width: 674px :height: 160px .. code:: ipython3 s('13b') .. parsed-literal:: :class: ipython-result 13b-KeySignatures-ChurchModes.xml All different modes: major, minor, ionian, dorian, phrygian, lydian, mixolydian, aeolian, and locrian; All modes are given with 2 sharps. .. image:: musicxmlTest_48_1.png :width: 708px :height: 300px .. code:: ipython3 print([k.mode for k in scores['13b'].recurse().getElementsByClass('Key')]) .. parsed-literal:: :class: ipython-result ['major', 'minor', 'ionian', 'dorian', 'phrygian', 'lydian', 'mixolydian', 'aeolian', 'locrian'] .. code:: ipython3 s('13c') # no octave support on musescore or finale .. parsed-literal:: :class: ipython-result 13c-KeySignatures-NonTraditional.xml Non-traditional key signatures, where each alteration is separately given. Here we have (f sharp, a flat, b flat) and (c flatflat, g sharp sharp, d flat, b sharp, f natural), where in the second case an explicit octave is given for each alteration. .. image:: musicxmlTest_50_1.png :width: 674px :height: 160px .. code:: ipython3 s('13d') # great musescore support except octaves. no Finale support; .. parsed-literal:: :class: ipython-result 13d-KeySignatures-Microtones.xml Non-traditional key signatures with microtone alterations: (g flat-and-a-half, a flat, b half-flat, c natural, d half-sharp, e sharp, f sharp-and-a-half). .. image:: musicxmlTest_51_1.png :width: 567px :height: 160px .. code:: ipython3 s('13e') .. parsed-literal:: :class: ipython-result 13e-KeySignatures-MidMeasure-Change.xml Mid-Measure Key-Change: 2 sharps, 2 flats, 0 sharps/flats, 7 sharps, no mode. .. image:: musicxmlTest_52_1.png :width: 674px :height: 169px 14 … Staff attributes --------------------- .. code:: ipython3 # failing on mid-measure staff-details change. # Incorrect interpretation of lines is MuseScore; finale incorrect also s('14a') .. parsed-literal:: :class: ipython-result 14a-StaffDetails-LineChanges.xml The number of staff lines can be modified by using the staff-lines child of the staff-details attribute. This can happen globally (the first staff has one line globally) or during the part at the beginning of a measure and even inside a measure (the second part has 5 lines initially, 4 at the beginning of the second measure, and 3 starting in the middle of the third measure). .. image:: musicxmlTest_54_1.png :width: 708px :height: 208px 21 … Chorded notes ------------------ .. code:: ipython3 s('21a') .. parsed-literal:: :class: ipython-result 21a-Chord-Basic.xml One simple chord consisting of two notes. .. image:: musicxmlTest_56_1.png :width: 467px :height: 156px .. code:: ipython3 s('21b') .. parsed-literal:: :class: ipython-result 21b-Chords-TwoNotes.xml Some subsequent (identical) two-note chords. .. image:: musicxmlTest_57_1.png :width: 674px :height: 156px .. code:: ipython3 s('21c') .. parsed-literal:: :class: ipython-result 21c-Chords-ThreeNotesDuration.xml Some three-note chords, with various durations. .. image:: musicxmlTest_58_1.png :width: 581px :height: 160px .. code:: ipython3 s('21d') .. parsed-literal:: :class: ipython-result 21d-Chords-SchubertStabatMater.xml Chords in the second measure, after several ornaments in the first measure and a p at the beginning of the second measure. .. image:: musicxmlTest_59_1.png :width: 674px :height: 167px .. code:: ipython3 s('21e') .. parsed-literal:: :class: ipython-result 21e-Chords-PickupMeasures.xml Check for proper chord detection after a pickup measure (i.e. the first beat of the measure is not aligned with multiples of the time signature)! .. image:: musicxmlTest_60_1.png :width: 552px :height: 156px .. code:: ipython3 s('21f') # failing -- finale interprets chord correctly, but not the p; musescore, perfect. .. parsed-literal:: :class: ipython-result 21f-Chord-ElementInBetween.xml Between the individual notes of a chord there can be direction or harmony elements, which should be properly assigned to the chord (or the position of the chord). .. image:: musicxmlTest_61_1.png :width: 567px :height: 167px 22 … Note settings, heads, etc. ------------------------------- .. code:: ipython3 s('22a') # block: MuseScore; finale gets all but Cluster .. parsed-literal:: :class: ipython-result 22a-Noteheads.xml Different note styles, using the element. First, each note head style is printed with four quarter notes, two with filled heads, two with unfilled heads, where first the stem is up and then the stem is down. After that, each note head style is printed with a half note (should have an unfilled head by default). Finally, the Aiken note head styles are tested, once with stem up and once with stem down. .. image:: musicxmlTest_63_1.png :width: 708px :height: 834px .. code:: ipython3 s('22b') # failing; finale gets right; musescore: as shown. .. parsed-literal:: :class: ipython-result 22b-Staff-Notestyles.xml Staff-connected note styles: slash notation, hidden notes (with and without hidden staff lines) .. image:: musicxmlTest_64_1.png :width: 674px :height: 170px .. code:: ipython3 s('22c') # blocked by MuseScore: 22a .. parsed-literal:: :class: ipython-result 22c-Noteheads-Chords.xml Different note styles for individual notes inside a chord, using the element. .. image:: musicxmlTest_65_1.png :width: 674px :height: 202px .. code:: ipython3 s('22d') # failing parenthesized rest; block MuseScore. Finale no support. .. parsed-literal:: :class: ipython-result 22d-Parenthesized-Noteheads.xml Parenthesized note heads. First, a single parenthesized note is tested, once with a normal and then with a non-standard notehead, then two chords with some/all parenthesized noteheads and finally a parenthesized rest. .. image:: musicxmlTest_66_1.png :width: 561px :height: 156px 23 … Triplets, Tuplets ---------------------- .. code:: ipython3 s('23a') # blocking on MuseScore not liking 4:2 (but okay on 4:1) .. parsed-literal:: :class: ipython-result 23a-Tuplets.xml Some tuplets (3:2, 3:2, 3:2, 4:2, 4:1, 7:3, 6:2) with the default tuplet bracket displaying the number of actual notes played. The second tuplet does not have a number attribute set. .. image:: musicxmlTest_68_1.png :width: 674px :height: 163px .. code:: ipython3 for n in scores['23a'].recurse().notes: if n.duration.tuplets: print(n.duration.tuplets[0], n.duration.tuplets[0].type) .. parsed-literal:: :class: ipython-result start None stop start None stop start None stop start None None stop start None None stop start None None None None None stop start None None None None stop .. code:: ipython3 scores['23a'].show('text') .. parsed-literal:: :class: ipython-result {0.0} {0.0} {0.0} {0.0} {0.0} {0.0} {0.0} {0.0} {0.6667} {1.3333} {2.0} {2.6667} {3.3333} {4.0} {0.0} {0.6667} {1.3333} {2.0} {2.5} {3.0} {3.5} {8.0} {0.0} {0.25} {0.5} {0.75} {1.0} {1.4286} {1.8571} {2.2857} {2.7143} {3.1429} {3.5714} {12.0} {0.0} {0.3333} {0.6667} {1.0} {1.3333} {1.6667} {2.0} {4.0} .. code:: ipython3 s('23b') # block MuseScore + Finale. Bad beaming is a separate problem. .. parsed-literal:: :class: ipython-result 23b-Tuplets-Styles.xml Different tuplet styles: default, none, x:y, x:y-note; Each with bracket, slur and none. Finally, non-standard 4:3 and 17:2 tuplets are given. .. image:: musicxmlTest_71_1.png :width: 708px :height: 292px .. code:: ipython3 s('23c') # acceptable... .. parsed-literal:: :class: ipython-result 23c-Tuplet-Display-NonStandard.xml Displaying tuplet note types, that might not coincide with the displayed note. The first two tuplets take the type from the note, the second two from the element, the remaining pair of tuplets from the notation element. The tuplets in measure 3 specify both a number of notes and a type inside the and elements, the ones in measure 4 specify only a note type (but no number), and the ones in measure 5 specify only a number of tuplet-notes (but no type, which is deduced from the note's type). The first tuplet of measures 3-5 uses 'display-type="actual"', the second one 'display-type="both"'. FIXME: The tuplet-normal should coincide with the real notes! .. image:: musicxmlTest_72_1.png :width: 674px :height: 163px .. code:: ipython3 s('23d') # block: musescore .. parsed-literal:: :class: ipython-result 23d-Tuplets-Nested.xml Tuplets can be nested. Here there is a 5:2 tuplet inside a 3:2 tuple (all consisting of written eighth notes). .. image:: musicxmlTest_73_1.png :width: 674px :height: 166px .. code:: ipython3 s('23e') .. parsed-literal:: :class: ipython-result 23e-Tuplets-Tremolo.xml Tremolo tuplets are tuplets on single notes with a tremolo ornament. The application shall correctly import these notes with 2/3 or their time... .. image:: musicxmlTest_74_1.png :width: 674px :height: 167px .. code:: ipython3 s('23f') # acceptable behavior unless supports Tuplet is explicit. .. parsed-literal:: :class: ipython-result 23f-Tuplets-DurationButNoBracket.xml Some "triplets" on the end of the first and in the second staff, using only , but not explicit tuplet bracket. Thus, the duration of the notes in the second staff should be scaled properly in comparison to staff 1, but no visual indication about the tuplets is given. .. image:: musicxmlTest_75_1.png :width: 673px :height: 240px 24 … Grace notes ---------------- .. code:: ipython3 s('24a') # are slurs default? .. parsed-literal:: :class: ipython-result 24a-GraceNotes.xml Different kinds of grace notes: acciaccatura, appoggiatura; beamed grace notes; grace notes with accidentals; different durations of the grace notes. .. image:: musicxmlTest_77_1.png :width: 674px :height: 156px .. code:: ipython3 s('24b') .. parsed-literal:: :class: ipython-result 24b-ChordAsGraceNote.xml Chords as grace notes. .. image:: musicxmlTest_78_1.png :width: 517px :height: 156px .. code:: ipython3 s('24c') .. parsed-literal:: :class: ipython-result 24c-GraceNote-MeasureEnd.xml A grace note that appears at the measure end (without any steal-from-* attribute set). Some applications need to convert this into an after-grace. .. image:: musicxmlTest_79_1.png :width: 549px :height: 156px .. code:: ipython3 s('24d') .. parsed-literal:: :class: ipython-result 24d-AfterGrace.xml Some grace notes and after-graces (indicated by steal-time-previous and steal-time-following). .. image:: musicxmlTest_80_1.png :width: 458px :height: 156px .. code:: ipython3 s('24e') # failing but blocked by MuseScore and Finale .. parsed-literal:: :class: ipython-result 24e-GraceNote-StaffChange.xml A grace note on a different staff than the actual note. .. image:: musicxmlTest_81_1.png :width: 548px :height: 156px .. code:: ipython3 s('24f') .. parsed-literal:: :class: ipython-result 24f-GraceNote-Slur.xml A grace note with a slur to the actual note. This can be interpreted as acciaccatura or appoggiatura, depending on the existence of a slash. .. image:: musicxmlTest_82_1.png :width: 488px :height: 156px .. code:: ipython3 grace = scores['24f'].recurse().notes[1] grace.duration.isGrace .. parsed-literal:: :class: ipython-result True .. code:: ipython3 sl = scores['24f'].recurse().getElementsByClass('Slur')[0] sl[0] .. parsed-literal:: :class: ipython-result .. code:: ipython3 sl[0] is grace .. parsed-literal:: :class: ipython-result True 31 … Dynamics and other single symbols -------------------------------------- .. code:: ipython3 s('31a') # todo, split... .. parsed-literal:: :class: ipython-result 31a-Directions.xml All elements defined in MusicXML. The lyrics for each note describes the direction element assigned to that note. .. image:: musicxmlTest_87_1.png :width: 708px :height: 750px .. code:: ipython3 s('31c') # todo, split .. parsed-literal:: :class: ipython-result 31c-MetronomeMarks.xml Tempo Markings: note=bpm, text (note=bpm), note=note, (note=note), (note=bpm) .. image:: musicxmlTest_88_1.png :width: 674px :height: 182px 32 … Notations and Articulations -------------------------------- .. code:: ipython3 # failling on normal from, angled ferm, squareferm position; # arp., non-arp., acc.mark (block museScore -- what is this?), s('32a-Notations') .. parsed-literal:: :class: ipython-result 32a-Notations.xml All elements defined in MusicXML. The lyrics show the notation assigned to each note. .. image:: musicxmlTest_90_1.png :width: 708px :height: 429px .. code:: ipython3 # failing on delayed turn (at least a turn should be put in), # turn + accidental (block: museScore). s('32aa') .. parsed-literal:: :class: ipython-result 32aa-Notations2_Ornaments.xml All elements defined in MusicXML. The lyrics show the ornament assigned to each note. .. image:: musicxmlTest_91_1.png :width: 708px :height: 305px .. code:: ipython3 # harmonics -- all: block museScore # dbl + trp. tongue (block MS), fre1, fret0 (block MS) # all from "hammer" to the end: blocked by MS. s('32ab') .. parsed-literal:: :class: ipython-result 32ab-Notations3.xml All elements defined in MusicXML. The lyrics show the technical assigned to each note. .. image:: musicxmlTest_92_1.png :width: 708px :height: 694px .. code:: ipython3 # failing: dynamics in misc notations # accent positions not working on MS either -- may be a change in standard. s('32ac') .. parsed-literal:: :class: ipython-result 32ac-Notations4.xml Some miscellanious elements defined in MusicXML including dynamics in notations. The lyrics show the notation assigned to each note. .. image:: musicxmlTest_93_1.png :width: 674px :height: 213px .. code:: ipython3 s('32b') # font-sizes, colors not working. .. parsed-literal:: :class: ipython-result 32b-Articulations-Texts.xml Text markup: different font sizes, weights and colors. .. image:: musicxmlTest_94_1.png :width: 851px :height: 180px .. code:: ipython3 s('32c') .. parsed-literal:: :class: ipython-result 32c-MultipleNotationChildren.xml It should not make any difference whether two articulations are given inside two different notation elements, inside two different articulations children of the same notation element or inside the same articulations element. Thus, all three notes should have a staccato and an accent. .. image:: musicxmlTest_95_1.png :width: 564px :height: 156px .. code:: ipython3 s('32d') # block M21 not supported; musescore supports all. .. parsed-literal:: :class: ipython-result 32d-Arpeggio.xml Different Arpeggio directions (normal, up, down, non-arpeggiate) .. image:: musicxmlTest_96_1.png :width: 674px :height: 176px 33 … Spanners ------------- .. code:: ipython3 # block MuseScore: # bend-alter, hammer, pull, ped change # failing: dashed slur, octave shift mark, bend-alter, slide, # grouping. hammer, pull, all ped. s('33a') .. parsed-literal:: :class: ipython-result 33a-Spanners.xml Several spanners defined in MusicXML: tuplet, slur (solid, dashed), tie, wedge (cresc, dim), tr + wavy-line, single-note trill spanner, octave-shift (8va,15mb), bracket (solid down/down, dashed down/down, solid none/down, dashed none/up, solid none/none), dashes, glissando (wavy), bend-alter, slide (solid), grouping, two-note tremolo (B to D#), hammer-on, pull-off, pedal (down, change, up). .. image:: musicxmlTest_98_1.png :width: 708px :height: 418px .. code:: ipython3 s('33b') # not necessarily a spanner except in Lilypond .. parsed-literal:: :class: ipython-result 33b-Spanners-Tie.xml Two simple tied whole notes .. image:: musicxmlTest_99_1.png :width: 475px :height: 156px .. code:: ipython3 s('33c') .. parsed-literal:: :class: ipython-result 33c-Spanners-Slurs.xml A note can be the end of one slur and the start of a new slur. Also, in MusicXML, nested slurs are possible like in the second measure where one slur goes over all four notes, and another slur goes from the second to the third note. .. image:: musicxmlTest_100_1.png :width: 674px :height: 156px .. code:: ipython3 s('33d') # overinterpreting. .. parsed-literal:: :class: ipython-result 33d-Spanners-OctaveShifts.xml All types of octave shifts (15ma, 15mb, 8va, 8vb) .. image:: musicxmlTest_101_1.png :width: 674px :height: 213px .. code:: ipython3 try: s('33e') # check if actually invalid except spanner.SpannerException: print('Music21 v7.3 no longer writes ottava with invalid size') .. parsed-literal:: :class: ipython-result 33e-Spanners-OctaveShifts-InvalidSize.xml Invalid octave-shifts: 27 down, 11 up. Music21 v7.3 no longer writes ottava with invalid size .. code:: ipython3 s('33f') # blocking: MuseScore .. parsed-literal:: :class: ipython-result 33f-Trill-EndingOnGraceNote.xml A trill spanner that spans a grace note and ends on an after-grace note at the end of the measure. .. image:: musicxmlTest_103_1.png :width: 673px :height: 217px .. code:: ipython3 s('33g') .. parsed-literal:: :class: ipython-result 33g-Slur-ChordedNotes.xml Slurs on chorded notes: Only the first note of the chord should get the slur notation. Some applications print out the slur for all notes -- these should be ignored. Edited by MSC to not reuse the same slur number in generating the overlapping slurs. .. image:: musicxmlTest_104_1.png :width: 516px :height: 158px .. code:: ipython3 # failing except for normal/wavy glissando # museScore blocking: solid, dashed, dotted for gliss, and # dashed, dotted, wavy for slide. Text works great! s('33h') .. parsed-literal:: :class: ipython-result 33h-Spanners-Glissando.xml All different types of glissando defined in MusicXML .. image:: musicxmlTest_105_1.png :width: 708px :height: 299px .. code:: ipython3 s('33i') .. parsed-literal:: :class: ipython-result 33i-Ties-NotEnded.xml Several ties that have their end tag missing. .. image:: musicxmlTest_106_1.png :width: 674px :height: 165px 41 … Multiple parts (staves) ---------------------------- .. code:: ipython3 s('41a') .. parsed-literal:: :class: ipython-result 41a-MultiParts-Partorder.xml A piece with four parts (P0, P1, P2, P3; different from what Finale creates!). Are they converted in the correct order? .. image:: musicxmlTest_108_1.png :width: 567px :height: 373px .. code:: ipython3 s('41b') # blocking: MuseScore? needs instruments? .. parsed-literal:: :class: ipython-result 41b-MultiParts-MoreThan10.xml A piece with 20 parts to check whether an application supports that many parts and whether they are correctly sorted. .. image:: musicxmlTest_109_1.png :width: 468px :height: 23px .. code:: ipython3 s('41c') # blocking since music21 only displays the first page in the notebook and the staves are on the next page. .. parsed-literal:: :class: ipython-result 41c-StaffGroups.xml A huge orchestra score with 28 parts and different kinds of nested bracketed groups. Each part/group is assigned a name and an abbreviation to be shown before the staff. Also, most of the groups show unbroken barlines, while the barlines are broken between the groups. .. image:: musicxmlTest_110_1.png :width: 289px :height: 28px .. code:: ipython3 s('41d') .. parsed-literal:: :class: ipython-result 41d-StaffGroups-Nested.xml Two properly nested part groups: One group (with a square bracket) goes from staff 2 to 4) and another group (with a curly bracket) goes from staff 3 to 4. .. image:: musicxmlTest_111_1.png :width: 708px :height: 445px .. code:: ipython3 s('41e') # failing .. parsed-literal:: :class: ipython-result 41e-StaffGroups-InstrumentNames-Linebroken.xml Part names and abbreviations can contain line breaks. .. image:: musicxmlTest_112_1.png :width: 734px :height: 418px .. code:: ipython3 s('41f') .. parsed-literal:: :class: ipython-result 41f-StaffGroups-Overlapping.xml MusicXML allows for overlapping part-groups, while many applications do not allow overlapping groups, but require them to be properly nested. In this case, one group (with a square bracket) goes from staff 2 to 4) and another group (with a curly bracket) goes from staff 3 to 5. .. image:: musicxmlTest_113_1.png :width: 590px :height: 445px .. code:: ipython3 s('41g') .. parsed-literal:: :class: ipython-result 41g-PartNoId.xml A part with no id attribute. Since this piece has only one part, it is clear which part is described by the one part element. .. image:: musicxmlTest_114_1.png :width: 446px :height: 156px .. code:: ipython3 s('41h') # warns, skips the part -- acceptable behavior .. parsed-literal:: :class: ipython-result 41h-TooManyParts.xml This piece has more part elements than the part-list section gives. One can either convert all the parts present, but not listed in the part-list, or simply not import / ignore them. .. image:: musicxmlTest_115_1.png :width: 485px :height: 156px .. code:: ipython3 s('41i') .. parsed-literal:: :class: ipython-result 41i-PartNameDisplay-Override.xml MusicXML allows part-name and part-name-display in the score-part element. If part-name-display is given, it overrides the part-name for display. The first staff uses only part-name, while the second one (same part-name) overrides it with a custom text. Similar for the part-abbreviation used in subsequent staves. .. image:: musicxmlTest_116_1.png :width: 708px :height: 431px 42 … Multiple voices per staff ------------------------------ .. code:: ipython3 s('42a') # failing (works in musescore.) .. parsed-literal:: :class: ipython-result 42a-MultiVoice-TwoVoicesOnStaff-Lyrics.xml Two voices share one staff. Each voice is assigned some lyrics. .. image:: musicxmlTest_118_1.png :width: 676px :height: 203px .. code:: ipython3 s('42b') .. parsed-literal:: :class: ipython-result 42b-MultiVoice-MidMeasureClefChange.xml A multi-voice / multi-staff part with a clef change in the middle of a measure and a for voice 2 jumping back beyond that clef change. .. image:: musicxmlTest_119_1.png :width: 673px :height: 236px 43 … One part on multiple staves -------------------------------- .. code:: ipython3 s('43a') .. parsed-literal:: :class: ipython-result 43a-PianoStaff.xml A simple piano staff .. image:: musicxmlTest_121_1.png :width: 454px :height: 217px .. code:: ipython3 s('43b') .. parsed-literal:: :class: ipython-result 43b-MultiStaff-DifferentKeys.xml A piano staff with different keys and clefs for each of its staves. The keys and clefs for both staves are given at the very beginning of the measure. .. image:: musicxmlTest_122_1.png :width: 557px :height: 217px .. code:: ipython3 s('43c') .. parsed-literal:: :class: ipython-result 43c-MultiStaff-DifferentKeysAfterBackup.xml A piano staff with different keys and clefs for each of its staves. The key and clef for the second staff is given only after a backward, just before the first note of the second staff is given, but after the whole measure for staff 1 has been given. .. image:: musicxmlTest_123_1.png :width: 653px :height: 217px .. code:: ipython3 s('43d') # failing # cross-staff-beaming. fails utterly in m21 so far. # chord tones fail to cross on musescore; perfect on Finale. .. parsed-literal:: :class: ipython-result 43d-MultiStaff-StaffChange.xml Staff changes in a piano staff. The voice from the second staff has some notes/chords on the first staff. The final two chords have some notes on the first, some on the second staff. .. image:: musicxmlTest_124_1.png :width: 673px :height: 227px .. code:: ipython3 s('43e') .. parsed-literal:: :class: ipython-result 43e-Multistaff-ClefDynamics.xml A piano staff with dynamics and clef changes, where each element (ffff, wedge and clef changes) applies only to one voice or one staff, respectively. .. image:: musicxmlTest_125_1.png :width: 673px :height: 235px 45 … Repeats ------------ .. code:: ipython3 s('45a') .. parsed-literal:: :class: ipython-result 45a-SimpleRepeat.xml A simple, repeated measure (repeated 5 times) .. image:: musicxmlTest_127_1.png :width: 479px :height: 156px .. code:: ipython3 s('45b') .. parsed-literal:: :class: ipython-result 45b-RepeatWithAlternatives.xml A simple repeat with two alternative endings (volta brackets). .. image:: musicxmlTest_128_1.png :width: 674px :height: 156px .. code:: ipython3 s('45c') .. parsed-literal:: :class: ipython-result 45c-RepeatMultipleTimes.xml Repeats can also be nested. .. image:: musicxmlTest_129_1.png :width: 674px :height: 156px .. code:: ipython3 print(musicxmlOut['45c']) .. parsed-literal:: :class: ipython-result 45c-RepeatMultipleTimes.xml 45c-RepeatMultipleTimes.xml Music21 2022-03-26 music21 v.7.3.0 7 40 MusicXML Part 10080 0 major G 2 40320 40320 40320 40320 40320 40320 40320 40320 light-heavy .. code:: ipython3 s('45d') .. parsed-literal:: :class: ipython-result 45d-Repeats-Nested-Alternatives.xml Nested repeats, each with alternative endings. .. image:: musicxmlTest_131_1.png :width: 674px :height: 156px .. code:: ipython3 s('45e') .. parsed-literal:: :class: ipython-result 45e-Repeats-Nested-Alternatives.xml Some more nested repeats with alternatives. The barline between measure 7 and 8 will probably be messed up! (Should be a repeat on both sides!) .. image:: musicxmlTest_132_1.png :width: 674px :height: 156px .. code:: ipython3 s('45f') .. parsed-literal:: :class: ipython-result 45f-Repeats-InvalidEndings.xml Some more nested repeats with alternatives, where the MusicXML file does not make sense in the first place. How well are applications able to cope with improper repeats and alternatives? .. image:: musicxmlTest_133_1.png :width: 674px :height: 156px .. code:: ipython3 s('45g') .. parsed-literal:: :class: ipython-result 45g-Repeats-NotEnded.xml A forward-repeating bar line without an ending repeat bar. .. image:: musicxmlTest_134_1.png :width: 513px :height: 156px 46 … Barlines, Measures ----------------------- .. code:: ipython3 s('46a') .. parsed-literal:: :class: ipython-result 46a-Barlines.xml Different types of (non-repeat) barlines: default (no setting), regular, dotted, dashed, heavy, light-light, light-heavy, heavy-light, heavy-heavy, tick, short, none. .. image:: musicxmlTest_136_1.png :width: 674px :height: 156px .. code:: ipython3 s('46b') # failing .. parsed-literal:: :class: ipython-result 46b-MidmeasureBarline.xml Barlines can appear at mid-measure positions, without using an implicit measure! .. image:: musicxmlTest_137_1.png :width: 522px :height: 156px .. code:: ipython3 s('46c') .. parsed-literal:: :class: ipython-result 46c-Midmeasure-Clef.xml A clef change in the middle of a measure, using either an implicit measure or simply placing the attributes in the middle of the measure. .. image:: musicxmlTest_138_1.png :width: 674px :height: 156px .. code:: ipython3 s('46d') .. parsed-literal:: :class: ipython-result 46d-PickupMeasure-ImplicitMeasures.xml A 3/8 pickup measure, a measure that is split into one (incomplete, only 2/4) measure and an implicit measure, and an incomplete measure (containg 3/4). .. image:: musicxmlTest_139_1.png :width: 674px :height: 156px .. code:: ipython3 s('46e') .. parsed-literal:: :class: ipython-result 46e-PickupMeasure-SecondVoiceStartsLater.xml Voice 2 should start at 2nd beat of first full measure. .. image:: musicxmlTest_140_1.png :width: 691px :height: 168px .. code:: ipython3 s('46f') .. parsed-literal:: :class: ipython-result 46f-IncompleteMeasures.xml Measures can contain less notes than the time signature says. Here, the first and third measures contain only two quarters instead of four. .. image:: musicxmlTest_141_1.png :width: 674px :height: 156px .. code:: ipython3 s('46g') # failing somewhere on FiguredBass .. parsed-literal:: :class: ipython-result 46g-PickupMeasure-Chordnames-FiguredBass.xml Pickup measure with chord names and figured bass. .. image:: musicxmlTest_142_1.png :width: 719px :height: 156px 51 … Header information ----------------------- .. code:: ipython3 s('51b') .. parsed-literal:: :class: ipython-result 51b-Header-Quotes.xml Several header fields and part names can contain quotes ("). This test checks whether they are converted/imported without problems (i.e. whether they are correctly escaped when converting). .. image:: musicxmlTest_144_1.png :width: 674px :height: 156px .. code:: ipython3 s('51c') .. parsed-literal:: :class: ipython-result 51c-MultipleRights.xml There can be multiple tags in the identification element of the score. The conversion shall still work, ideally using both of them. .. image:: musicxmlTest_145_1.png :width: 485px :height: 156px .. code:: ipython3 s('51d') .. parsed-literal:: :class: ipython-result 51d-EmptyTitle.xml A piece with an empty (but existing) work-title, but a non-empty movement-title. In this case the movement-title should be chosen, even though the work-title exists. .. image:: musicxmlTest_146_1.png :width: 636px :height: 156px 52 … Page layout ---------------- .. code:: ipython3 s('52a') # block: ipython21 -- only gives first png image. .. parsed-literal:: :class: ipython-result 52a-PageLayout.xml Several page layout settings: paper size, margins, system margins and distances, different fonts, etc. .. image:: musicxmlTest_148_1.png :width: 454px :height: 84px .. code:: ipython3 s('52b') # block: ipython21 -- only gives first png image. .. parsed-literal:: :class: ipython-result 52b-Breaks.xml System and page breaks, given in a element .. image:: musicxmlTest_149_1.png :width: 708px :height: 287px 61 … Lyrics ----------- .. code:: ipython3 s('61a') .. parsed-literal:: :class: ipython-result 61a-Lyrics.xml Some notes with simple lyrics: Syllables, notes without a syllable, syllable spanners. .. image:: musicxmlTest_151_1.png :width: 674px :height: 165px .. code:: ipython3 s('61b') .. parsed-literal:: :class: ipython-result 61b-MultipleLyrics.xml Multiple (simple) lyrics. The order of the exported stanzas is relevant (identified by the number attribute in this test case) .. image:: musicxmlTest_152_1.png :width: 674px :height: 198px .. code:: ipython3 s('61c') .. parsed-literal:: :class: ipython-result 61c-Lyrics-Pianostaff.xml Lyrics assigned to the voices of a piano staff containing two simple staves. Each staff is assigned exactly one lyrics line. .. image:: musicxmlTest_153_1.png :width: 673px :height: 238px .. code:: ipython3 s('61d') .. parsed-literal:: :class: ipython-result 61d-Lyrics-Melisma.xml How to treat lyrics and slurred notes. Normally, a slurred group of notes is assigned only one lyrics syllable. .. image:: musicxmlTest_154_1.png :width: 674px :height: 167px .. code:: ipython3 s('61e') .. parsed-literal:: :class: ipython-result 61e-Lyrics-Chords.xml Assigning lyrics to chorded notes. .. image:: musicxmlTest_155_1.png :width: 674px :height: 175px .. code:: ipython3 s('61f') .. parsed-literal:: :class: ipython-result 61f-Lyrics-GracedNotes.xml Grace notes shall not mess up the lyrics, and they shall not be assigned a syllable. .. image:: musicxmlTest_156_1.png :width: 674px :height: 170px .. code:: ipython3 s('61g') .. parsed-literal:: :class: ipython-result 61g-Lyrics-NameNumber.xml A lyrics syllable can have both a number and a name attribute. The question is: What should be used to put syllables of the same voice together. This example uses different number/name combinations to check how different applications handle this unspecified case (The advice on the MusicXML mailing list was "there is no correct way, each application can do what it thinks is best"). The complete text should be (by note number): 1: Verse1A, Chorus1A, AnotherChorus1A 2: 1B, 2B 3: Verse1C, Chorus2C 4: Chorus1D 5: VerseE 6: NoneF (indicating no number or name was given) .. image:: musicxmlTest_157_1.png :width: 708px :height: 180px .. code:: ipython3 s('61h') .. parsed-literal:: :class: ipython-result 61h-Lyrics-BeamsMelismata.xml Beaming or slurs can indicate melismata for lyrics. Also make sure that notes without an explicit syllable are treated as if they were part of a melisma. .. image:: musicxmlTest_158_1.png :width: 674px :height: 172px .. code:: ipython3 s('61i') .. parsed-literal:: :class: ipython-result 61i-Lyrics-Chords.xml Each note of a chord can have some lyrics attached. In this case, each note of the chord has lyrics of the form "Lyrics [123]" attached, where each lyrics has a different number attribute to distinguish them. These syllables should be imported into three different stanzas and the timing should be correct. .. image:: musicxmlTest_159_1.png :width: 476px :height: 205px .. code:: ipython3 s('61j') # working since 6.7 .. parsed-literal:: :class: ipython-result 61j-Lyrics-Elisions.xml Multiple lyrics syllables assigned to a single note are implemented either using a space in the lyrics or by using the lyrics element. This testcase checks both of them. First, a note with one syllable (a) is given, then a note with two syllables (b c) separated by a space and finally a note with two (de) and one with three syllables (fgh) implemented using is given. .. image:: musicxmlTest_160_1.png :width: 482px :height: 170px .. code:: ipython3 for n in scores['61j'].recurse().notes: print(n.lyrics) .. parsed-literal:: :class: ipython-result [] [] [] [] .. code:: ipython3 s('61k') # failing on extenders on b, and CC. .. parsed-literal:: :class: ipython-result 61k-Lyrics-SpannersExtenders.xml Lyrics spanners: continued syllables and extenders, possibly spanning multiple notes. The intermediate notes do not have any element. Text should read: "A long-er text" .. image:: musicxmlTest_162_1.png :width: 674px :height: 170px .. code:: ipython3 s('61l') # working since 6.7 .. parsed-literal:: :class: ipython-result 61l-Lyrics-Elisions-Syllables.xml This is a similar test to 61j but the syllables in the lyrics have information in addition to . Note one is a standard lyric (begin). Note 2 has an elision this time, but same syllabic (middle) Note 3 has two syllables with different syllabic tags (middle, end) Note 4 has three syllables with begin, middle, end. .. image:: musicxmlTest_163_1.png :width: 551px :height: 168px .. code:: ipython3 for n in scores['61l'].recurse().notes: print(n.lyrics) .. parsed-literal:: :class: ipython-result [] [] [] [] 71 … Guitar notation -------------------- .. code:: ipython3 s('71a') .. parsed-literal:: :class: ipython-result 71a-Chordnames.xml A normal staff with several (complex) chord names displayed. .. image:: musicxmlTest_166_1.png :width: 674px :height: 156px .. code:: ipython3 s('71c') # not yet supported on input; output is fine. .. parsed-literal:: :class: ipython-result 71c-ChordsFrets.xml A staff with chord names and some fretboards shown. The fretboards can have an arbitrary number of frets/strings, can start at an arbitrary fret and can even contain fingering information. .. image:: musicxmlTest_167_1.png :width: 674px :height: 156px .. code:: ipython3 s('71d') # not yet supported .. parsed-literal:: :class: ipython-result 71d-ChordsFrets-Multistaff.xml Chords and fretboards assigned to the voices in a multi-voice, multi-staff part. There should be fret diagrams above each of the two staves. .. image:: musicxmlTest_168_1.png :width: 673px :height: 233px .. code:: ipython3 s('71e') # not yet supported .. parsed-literal:: :class: ipython-result 71e-TabStaves.xml Some tablature staves, with explicit fingering information and different string tunings given in the MusicXML file. .. image:: musicxmlTest_169_1.png :width: 708px :height: 820px .. code:: ipython3 s('71f') .. parsed-literal:: :class: ipython-result 71f-AllChordTypes.xml All chord types defined in MusicXML. The staff will only contain one c' note (NO chord) for all of them, but the chord names should be properly printed. .. image:: musicxmlTest_170_1.png :width: 708px :height: 1036px .. code:: ipython3 s('71g') .. parsed-literal:: :class: ipython-result 71g-MultipleChordnames.xml There can be multiple subsequent harmony elements, indicating a harmony change during a note .. image:: musicxmlTest_171_1.png :width: 530px :height: 156px 72 … Transposing instruments ---------------------------- .. code:: ipython3 s('72a') .. parsed-literal:: :class: ipython-result 72a-TransposingInstruments.xml Transposing instruments: Trumpet in Bb, Horn in Eb, Piano; All of them show the C major scale (the trumpet with 2 sharp, the horn with 3 sharp). .. image:: musicxmlTest_173_1.png :width: 708px :height: 301px .. code:: ipython3 s('72b') .. parsed-literal:: :class: ipython-result 72b-TransposingInstruments-Full.xml Various transposition. Each part plays a c'', just displayed in different display pitches. The second-to-last staff uses a transposition where the displayed c' is an actual f''' concert pitch. The final staff is an untransposed instrument. .. image:: musicxmlTest_174_1.png :width: 708px :height: 879px .. code:: ipython3 s('72c') .. parsed-literal:: :class: ipython-result 72c-TransposingInstruments-Change.xml 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 sharp, after the change it should have no accidentals. .. image:: musicxmlTest_175_1.png :width: 708px :height: 287px 73 … Percussion --------------- .. code:: ipython3 s('73a') .. parsed-literal:: :class: ipython-result 73a-Percussion.xml Three types of percussion staves: A five-line staff with bass clef for Timpani, a five-line staff with percussion clef, and a one-line percussion staff with only unpitched notes. .. image:: musicxmlTest_177_1.png :width: 708px :height: 293px 74 … Figured bass ----------------- .. code:: ipython3 s('74a') # not yet supported -- completely in music21 though. # fix to be well-formed musicxml and then put misformed in 99... .. parsed-literal:: :class: ipython-result 74a-FiguredBass.xml Some figured bass containing alterated figures, bracketed figures and slashed figures. The last note contains an empty element, which is invalid MusicXML, to check how well applications cope with malformed files. Note that this file does not contain any extenders! .. image:: musicxmlTest_179_1.png :width: 469px :height: 156px 75 … Other instrumental notation -------------------------------- .. code:: ipython3 s('75a') # not supported by music21 or MuseScore .. parsed-literal:: :class: ipython-result 75a-AccordionRegistrations.xml All possible accordion registrations. Edited to remove invalid MusicXML, which has been moved to 99d. .. image:: musicxmlTest_181_1.png :width: 708px :height: 306px 90 … Compressed MusicXML files ------------------------------ .. code:: ipython3 s('90a') .. parsed-literal:: :class: ipython-result 90a-Compressed-MusicXML.mxl A compressed MusicXML file, containing a simple MusicXML score and the corresponding .pdf output for reference. .. image:: musicxmlTest_183_1.png :width: 513px :height: 156px 99 … Compatibility with broken MusicXML --------------------------------------- All of these are acceptable to fail on. .. code:: ipython3 s('99a') .. parsed-literal:: :class: ipython-result 99a-Sibelius5-IgnoreBeaming.xml Dolet 3 for Sibelius (5.1) did not print out any closing beam tags, only starting and continuing beam tags. For such files, one either needs to ignore all beaming information or close all beams .. image:: musicxmlTest_185_1.png :width: 559px :height: 160px .. code:: ipython3 s('99b') .. parsed-literal:: :class: ipython-result 99b-Lyrics-BeamsMelismata-IgnoreBeams.xml If we properly ignore all beaming information from the Dolet 3 for Sibelius export file, make sure that the lyrics syllables are still assigned to the correct notes. .. image:: musicxmlTest_186_1.png :width: 685px :height: 172px .. code:: ipython3 s('99c') # used to crash musescore! .. parsed-literal:: :class: ipython-result 99c-Wavy-Lines-No-Numbers.xml A wavy line starts on the first note, ends on the second, starts again on the second and ends on the third. No numbers given. This is very bad, but technically not incorrect MusicXML. .. image:: musicxmlTest_187_1.png :width: 680px :height: 172px .. code:: ipython3 s('99d') # should simply not crash. .. parsed-literal:: :class: ipython-result 99d-AccordionInvalid.xml Invalid accordion registrations. Moved out of 75a.. No accordion-(high|middle|low) given, empty middle, middle with invalid value, middle with 0 .. image:: musicxmlTest_188_1.png :width: 674px :height: 175px .. code:: ipython3 untested .. parsed-literal:: :class: ipython-result []