Skip to main content

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
>>> msg = mido.Message('note_on', note=60)
>>> msg.note
60
>>> msg.bytes()
[144, 60, 64]
>>> msg.copy(channel=2)
<message note_on channel=2 note=60 velocity=64 time=0>
with mido.open_input('LinnStrument') as inport:
    for msg in inport:
        print(msg)
port = mido.open_output()
port.send(msg)
mid = mido.MidiFile('song.mid')
for msg in mid.play():
    port.send(msg)

Full documentation at https://mido.readthedocs.io/

Main Features

  • works in Python 2 and 3.

  • convenient message objects.

  • supports RtMidi, PortMidi and Pygame. New backends are easy to write.

  • full support for all 18 messages defined by the MIDI standard.

  • standard port API allows all kinds of input and output ports to be used interchangeably. New port types can be written by subclassing and overriding a few methods.

  • includes a reusable MIDI parser.

  • full support for MIDI files (read, write, create and play) with complete access to every message in the file, including all common meta messages.

  • can read and write SYX files (binary and plain text).

  • implements (somewhat experimental) MIDI over TCP/IP with socket ports. This allows for example wireless MIDI between two computers.

  • includes programs for playing MIDI files, listing ports and serving and forwarding ports over a network.

Status

1.2 is the third stable release.

See docs/changes.rst for a full list of changes.

Requirements

Mido targets Python 2.7 and 3.2.

See docs/installing.rst for more on requirements for port backends.

Installing

pip install mido

If you want to use ports:

pip install python-rtmidi

See docs/installing.rst for more.

Source Code

https://github.com/olemb/mido/

License

Mido is released under the terms of the MIT license.

Contact

Ole Martin Bjorndalen - ombdalen@gmail.com

Release files for mido 1.2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mido 1.2.3
File Size Uploaded
mido-1.2.3.tar.gz 92.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mido 1.2.3
File Interpreter ABI Platform
mido-1.2.3-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 161.8 kB

Release files / mido-1.2.3.tar.gz

Download URL mido-1.2.3.tar.gz
Size 92.5 kB
Tags Source
SHA-256 checksum
How to use checksums
beeb40e2bdf4a8f0ca0a6bfb7495b5c8d9dc1477d6515be66fca7e13f7a683fb
BLAKE2b-256 checksum
How to use checksums
635bda72dda93894c024c14c686c070581a51c29dadbe448b763f7bdd46a611d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / mido-1.2.3-py2.py3-none-any.whl

Download URL mido-1.2.3-py2.py3-none-any.whl
Size 69.3 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
e1c0e9545a02abfe198b72b48fb6752040185f8a9962feb3a15876bbb15bbd6b
BLAKE2b-256 checksum
How to use checksums
9e5a79d67bd4b65957b3c221c3f3bdf2656574b97d442c4fa9e2d86847ee205a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

1.3.3

2 release files

1.3.2

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.10

2 release files

1.2.9

2 release files

1.2.8

2 release files

1.2.7

2 release files

1.2.6

2 release files

1.2.5

2 release files

1.2.4

2 release files

This release

1.2.3 This release

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.24

2 release files

1.1.23

2 release files

1.1.22

2 release files

1.1.21

2 release files

1.1.20

2 release files

1.1.19

1 release file

1.1.18

2 release files

1.1.16

2 release files

1.1.15

2 release files

1.1.13

1 release file

1.1.11

2 release files

1.1.9

2 release files

1.1.8

2 release files

1.1.7

2 release files

1.1.6

2 release files

1.1.5

1 release file

1.1.4

1 release file

1.1.3

1 release file

1.1.2

1 release file

1.1.1

1 release file

1.1.0

1 release file

1.0.4

1 release file

1.0.3

1 release file

1.0.2

1 release file

1.0.1

1 release file

1.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page