MusicXML Interface
- muspy.read_musicxml(path, resolution=None, compressed=None, timeout=None)[source]
Read a MusicXML file into a Music object, paying close attention to details such as articulation and expressive features.
- Parameters:
- Returns:
Converted Music object.
- Return type:
- muspy.write_musicxml(path, music, compressed=None)[source]
Write a Music object to a MusicXML file.
- Parameters:
path (str or Path) – Path to write the MusicXML file.
music (
muspy.Music) – Music object to write.compressed (bool, optional) – Whether to write to a compressed MusicXML file. If None, infer from the extension of the filename (‘.xml’ and ‘.musicxml’ for an uncompressed file, ‘.mxl’ for a compressed file).