I/O functions
readmusicxml, parsemusicxml, writemusicxml, printmusicxml, pprint, fwritemusicxml, readmusicxml_partial, parsemusicxml_partialMusicXML.extractdataMusicXML.fwritemusicxmlMusicXML.parsemusicxmlMusicXML.parsemusicxml_partialMusicXML.printmusicxmlMusicXML.readmusicxmlMusicXML.readmusicxml_partialMusicXML.writemusicxml
MusicXML.extractdata — Methodextractdata(doc)Extracts musicxml data, builds all the types and stores them in proper format.
This function is not exported. Use readmusicxml and parsemusicxml instead.
Examples
data = extractdata(doc)MusicXML.fwritemusicxml — Methodfwritemusicxml(filename::AbstractString, x)
Fast write
MusicXML.parsemusicxml — Methodparsemusicxml(s)Parses musicxml from a string and then extracts the data, builds all the types and stores them in proper format.
Examples
data = parsemusicxml(s)MusicXML.parsemusicxml_partial — MethodSimilar to parsemusicxml but without converting it to a Julia type. Use the appropriate type to convert it
Examples
xml_note = parsemusicxml_partial("""
<note>
<grace/>
<pitch>
<step>G</step>
<octave>4</octave>
</pitch>
<voice>1</voice>
<type>16th</type>
<stem>up</stem>
<beam number="1">end</beam>
<beam number="2">end</beam>
</note>
""")
Note(xml_note)MusicXML.printmusicxml — Functionprintmusicxml(x)
printmusicxml(io, x)Print musicxml score
Examples
printmusicxml(score)MusicXML.readmusicxml — Methodreadmusicxml(filepath)Reads musicxml file and then extracts the data, builds all the types and stores them in proper format.
Examples
data = readmusicxml(joinpath("examples", "musescore.musicxml"))MusicXML.readmusicxml_partial — MethodSimilar to readmusicxml but without converting it to a Julia type. Use the appropriate type to convert it
Examples
xml_note = readmusicxml_partial(path_to_file)
Note(xml_note)MusicXML.writemusicxml — Functionwritemusicxml(filename::AbstractString, x)Writes musicxml score into a file.
Examples
writemusicxml("myscore.musicxml", score)