drumscript.export_xml

export_xml(score, output_path=None, **kwargs)[source]

Exports a DrumScript score object to MusicXML format.

MusicXML is the universal industry standard for sharing digital sheet music. Generating an XML file allows you to seamlessly import your DrumScript transcription into professional notation software like Sibelius, Finale, MuseScore, or Guitar Pro for further editing.

Parameters:
  • score (object) – The internal score object generated by build_score().

  • output_path (str, optional) – The exact file path to save the XML. Defaults to ‘drumscript.xml’ in CWD.

Returns:

The absolute path to the generated XML file.

Return type:

str

Note

When importing MusicXML into MuseScore, you may need to right-click the staff and select “Edit Drumset” to map the custom noteheads to your preference.

Example:

import drumscript as ds

# Assuming `score` is a previously generated score object
xml_path = ds.export_xml(score, output_path="./xml_scores/my_song.xml")