music_xml 2.7.0
music_xml: ^2.7.0 copied to clipboard
A Dart package to parse and serialize MusicXML 4.0.
2.7.0 #
- Support compressed
.mxlfiles viaMusicXmlDocument.parseMxl(List<int> bytes)#37 - Locates root file via
META-INF/container.xml; falls back to first.xmlin the archive
2.6.0 #
New Features #
<notations>element with<tied>,<slur>,<tuplet>,<fermata>,<articulations>,<ornaments>,<dynamics>,<technical>,<accidental-mark>- Direct
<note>children:<beam>,<stem>,<staff>,<accidental>,<rest>,<dot>,<voice>,<duration> <tie>refactored toXmlElementwithStartStopAttrandtime-onlyattribute- Data type enums:
BeamValue,StemValue,StartStopContinue,TiedType,FermataShape,UprightInverted - Shared element:
<voice>(multi-parent:<note>,<direction>,<forward>) - Moved
lyric.dart,tie.dart,grace.dartintonote/directory
Breaking Changes #
Note.voicechanged frominttoVoice?(use.contentfor the string value)Note.isRestis now a getter (rest != null);Note.restis a typedRest?elementTie.typechanged fromStartStoptoStartStopAttr(use.startStopfor the enum value)
2.5.0 #
<part-group>element withgroup-name,group-name-display,group-abbreviation,group-abbreviation-display,group-symbol,group-barline,group-time,footnote,levelPartListpreserves interleaved order of<part-group>and<score-part>elements viaitems- Data type enums:
GroupSymbolValue,GroupBarlineValue - Shared elements:
<display-text>,<accidental-text>,<footnote>,<level> - Moved
StartStoptodata_types/withStartStopAttrclass
2.4.1 #
- Complete element roundtripping audit — every
XmlElementsubclass now passes properattributes:andchildren:tosuper.tag() - Typed attribute classes:
DecimalAttr,IntAttr,YesNoAttr,ValignAttr,EnclosureShapeAttr,TextDirectionAttr,XmlSpaceAttr - Element fields store typed
XmlAttributeobjects directly for zero-conversion roundtripping - Parse methods use single-pass
for/switchover attributes for O(n) instead of repeatedgetAttributecalls - Proper element classes for layout children:
LeftMargin,RightMargin,TopMargin,BottomMargin,PageHeight,PageWidth,StaffDistance,SystemDistance,TopSystemDistance - Moved data types to
data_types/:AccidentalValue,ClefSign - Fixed
Supports.parseto read XML attributes instead of child elements - Added
Localconstants for common attribute names - Upgraded
xmlto 6.6.1,testto 1.31.0
2.4.0 #
<credit>element withcredit-type,credit-words,credit-symbol,credit-image,link,bookmark- Sealed
CreditContentclass withCredit.image/Credit.contentconstructors - Data type enums:
CreditTypeValue,XLinkActuate,XLinkShow,XLinkType,LeftCenterRight,Valign,ValignImage,TextDirection,EnclosureShape,XmlSpace - Bump SDK to
>=3.2.0for sealed classes
2.3.0 #
<defaults>element withscaling,concert-score,page-layout,system-layout,staff-layout,appearance,system-dividers,music-font,word-font,lyric-font,lyric-language- Data type enums:
MarginType,LineWidthType,NoteSizeType,DistanceType,GlyphType,FontStyle,FontWeight,FontSize
2.2.0 #
<identification>element withcreator,rights,encoding,source,relation,miscellaneous, and<supports>
2.0.0 #
New Features #
- Restructured codebase to mirror the MusicXML 4.0 element hierarchy
- All elements now extend
XmlElement, enabling XML roundtripping (parse and serialize) <unpitched>support for percussion scores<grace>with typed attributes (slash,steal-time-following,steal-time-previous,make-time)<chord>as a typed element<score-partwise>withversion,movement-number,movement-title<part-list>/<midi-instrument>as typed elements- Typed
<attributes>withdivisions,key,time,clef,transposeas child elements <key>withkey-step,key-alter,<key-accidental>(fullAccidentalValueenum)<clef>with typedClefSignenum<backup>/<forward>/<direction>/<sound>as typed elementsPitch.toMidiPitch()andPitch.toPitchString()methods
Breaking Changes #
MusicXmlDocumentdocument.scoreParts->document.score.partList.scorePartsdocument.parts->document.score.parts
Measuremeasure.clefSignature->measure.attributesList.first.clefsmeasure.timeSignature->measure.attributesList.first.timesmeasure.keySignature->measure.attributesList.first.keysmeasure.barline(single) ->measure.barlines(list)measure.numberchanged frominttoNumber(use.value)
Notenote.pitch(wasMapEntry<String, int>) renamed tonote.pitchMapnote.pitchTypeSaferenamed tonote.pitch(now the typedPitchobject)
- Renamed classes
KeySignature->Key(mode is now aModeobject instead ofString)ClefSignature->Clef(sign is now aSignobject withClefSignenum)TimeSignature->Time
ScorePartScorePart.idchanged fromStringtoId(use.value)ScorePart.partNamechanged fromStringtoPartName(use.content)
TempotimePositionremoved (accessible viaSoundparent)
MusicXMLParserStateremoved from public exports (internal implementation detail)
Bug Fixes #
- Fix
Attributes.parsetimes parameter shadowing preventing time signatures from flowing to_fixTimeSignature - Fix
KeyAccidental.parsecrash on unrecognized accidental values (now falls back toAccidentalValue.other) - Fix
Grace.parseparsingmakeTimeattribute twice - Fix
Tempo.qpmgetter returningdynamicinstead ofdouble - Fix
_repairEmptyMeasurebeing a no-op (body was commented out) - Fix floating-point comparison in
_fixTimeSignature(now uses integer cross-multiplication) - Fix
Transpose.parsebeing called twice inAttributes.parse - Remove duplicate pitch parsing in
Note(consolidated intoPitchobject) - Standardize factory constructors to
.parse()(was inconsistent.parse()/.fromXml()) - Rename
chore.darttochord.dart(typo)
1.2.0 #
- Don't throw an exception when the lyric has no text
- Read
movement-title - Identify notes belonging to the same tied note by a shared id
- Refactor ChordSymbol to prevent warnings
- Add
SimpleKindto get the basic form of a chord, i.e.major,minor,augmented,diminished,susorother. With.kind.simple, the simple kind can be read out. - Add
Note.pitchTypeSafeproperty to read out pitch information more easily. - Add
Note.noteDurationTiedto get the complied duration of a tied note. - Add additional note information
Note.isNoteOn,isNoteOff,continuesOtherNote,isContinuedByOtherNote
1.0.4 #
- Public constructor
1.0.3 #
- Upgrade dependencies
1.0.2 #
- Refactor constructors with factory
1.0.1 #
- Remove redundant dependencies
1.0.0 #
- Support parse from xml string.