Mido - MIDI Objects for Python

Version 1.1.16

Mido is a library for working with MIDI messages and ports. It’s designed to be as straight forward and Pythonic as possible.

>>> import mido
>>> output = mido.open_output()
>>> output.send(mido.Message('note_on', note=60, velocity=64))
>>> with input as mido.open_input('SH-201'):
...     for message in input:
...         print(message)
>>> message = mido.Message('program_change', program=10)
>>> message.type
>>> message.channel = 2
>>> message.copy(program=9)
<message program_change channel=2 program=9 time=0>
>>> from mido import MidiFile
>>> for message in MidiFile('song.mid').play():
...     output.send(message)

Mido is short for MIDi Objects.

Source code

Latest stable release: https://github.com/olemb/mido/

Latest development version: https://github.com/olemb/mido/tree/develop/

About This Document

This document is available at https://mido.readthedocs.io/

To build locally:

python setup.py docs

This requires Sphinx. The resulting files can be found in docs/_build/.


Indices and tables