MIDI Objects for Python
Project description
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
License
Mido is released under the terms of the MIT license.
Contact
Ole Martin Bjorndalen - ombdalen@gmail.com
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file mido-1.2.3.tar.gz
.
File metadata
- Download URL: mido-1.2.3.tar.gz
- Upload date:
- Size: 92.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | beeb40e2bdf4a8f0ca0a6bfb7495b5c8d9dc1477d6515be66fca7e13f7a683fb |
|
MD5 | 1592d4b87483464aeb35d5bbe375e315 |
|
BLAKE2b-256 | 635bda72dda93894c024c14c686c070581a51c29dadbe448b763f7bdd46a611d |
File details
Details for the file mido-1.2.3-py2.py3-none-any.whl
.
File metadata
- Download URL: mido-1.2.3-py2.py3-none-any.whl
- Upload date:
- Size: 69.3 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e1c0e9545a02abfe198b72b48fb6752040185f8a9962feb3a15876bbb15bbd6b |
|
MD5 | dba4927de2d79715ff9c5a29b2b43fdb |
|
BLAKE2b-256 | 9e5a79d67bd4b65957b3c221c3f3bdf2656574b97d442c4fa9e2d86847ee205a |