@openmarch/musicxml-parser
v1.0.0
Published
MusicXML parsing utility for OpenMarch
Readme
musicxml-parser
A MusicXML parsing utility for the OpenMarch project
Development
Ensure you have Node installed
pnpm is optional but recommended
Install dependencies
pnpm installRun tests
pnpm run test
Creating Tests
To add a new MusicXML parsing test:
Copy the Template Directory
Duplicate the directorysrc/__test__/Template Testand give the new folder a descriptive name.Rename the TypeScript File
Inside your new folder, rename the.tsfile (for example,MyTest.test.ts) to match your test case.Replace the Template XML File
Replace theTEMPLATE.xmlfile in your new folder with your actual.musicxml,.XML, or.mxlfile.Update Variables in the Test File
Open the test file and update the following:- Change the value of the
filenamevariable to match your MusicXML file name. - Change the
testNamevariable to describe your test case.
- Change the value of the
Add Your Measures
Edit theexpectedarray in the test file to include the measures you want to test.
For a complete example, refer to the src/__test__/Test Score 1/TestScore1.test.ts file.
