drumscript.notation_generator.midi_exporter.export_to_midi

export_to_midi(classified_events: list[dict], output_path: str, tempo: float = 120.0)[source]

Takes a list of event dictionaries and writes a standard .mid file.

Parameters:
  • classified_events – List of dicts containing ‘time_sec’ and ‘instruments’.

  • output_path – Where to save the file (e.g., ‘output/drum_score.mid’).

  • tempo – The detected BPM of the track.