Contents
read_midifile()
write_midifile()
MIDI file I/O — read and write Standard MIDI Files.
Read a Standard MIDI File into a Pattern.
midifile (str | BinaryIO) – Path to a .mid file, or an open binary file object.
str
BinaryIO
.mid
Pattern
A Pattern containing one Track per MIDI track in the file. Ticks are relative (delta times) by default.
TypeError – If the file header is not valid MIDI.
Write a Pattern to a Standard MIDI File.
midifile (str | BinaryIO) – Destination file path or an open binary file object.
pattern (Pattern) – The Pattern to write.
None