music_xml 2.3.0
music_xml: ^2.3.0 copied to clipboard
A Dart package to parse and serialize MusicXML 4.0.
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.