| 1 |
Metadata-Version: 2.1 |
| 2 |
Name: mido |
| 3 |
Version: 1.3.3 |
| 4 |
Summary: MIDI Objects for Python |
| 5 |
Author-email: Ole Martin Bjorndalen <[email protected]> |
| 6 |
Maintainer-email: Radovan Bast <[email protected]>, Raphaël Doursenaud <[email protected]> |
| 7 |
License: MIT |
| 8 |
Project-URL: documentation, https://mido.readthedocs.io |
| 9 |
Project-URL: source, https://github.com/mido/mido |
| 10 |
Keywords: python,midi,midifile |
| 11 |
Classifier: Development Status :: 5 - Production/Stable |
| 12 |
Classifier: Intended Audience :: Developers |
| 13 |
Classifier: Natural Language :: English |
| 14 |
Classifier: License :: OSI Approved :: MIT License |
| 15 |
Classifier: Programming Language :: Python |
| 16 |
Classifier: Programming Language :: Python :: 3 :: Only |
| 17 |
Classifier: Programming Language :: Python :: 3.7 |
| 18 |
Classifier: Programming Language :: Python :: 3.8 |
| 19 |
Classifier: Programming Language :: Python :: 3.9 |
| 20 |
Classifier: Programming Language :: Python :: 3.10 |
| 21 |
Classifier: Programming Language :: Python :: 3.11 |
| 22 |
Classifier: Programming Language :: Python :: 3.12 |
| 23 |
Classifier: Programming Language :: Python :: 3.13 |
| 24 |
Classifier: Topic :: Multimedia :: Sound/Audio :: MIDI |
| 25 |
Classifier: Topic :: Software Development |
| 26 |
Classifier: Topic :: Software Development :: Libraries |
| 27 |
Classifier: Topic :: Software Development :: Libraries :: Python Modules |
| 28 |
Classifier: Topic :: Utilities |
| 29 |
Requires-Python: ~=3.7 |
| 30 |
Description-Content-Type: text/x-rst |
| 31 |
Provides-Extra: build-docs |
| 32 |
Provides-Extra: check-manifest |
| 33 |
Provides-Extra: lint-code |
| 34 |
Provides-Extra: lint-reuse |
| 35 |
Provides-Extra: ports-pygame |
| 36 |
Provides-Extra: ports-rtmidi |
| 37 |
Provides-Extra: ports-rtmidi-python |
| 38 |
Provides-Extra: release |
| 39 |
Provides-Extra: test-code |
| 40 |
Provides-Extra: dev |
| 41 |
Provides-Extra: ports-all |
| 42 |
License-File: LICENSE |
| 43 |
|
| 44 |
.. SPDX-FileCopyrightText: 2013 Ole Martin Bjorndalen <[email protected]> |
| 45 |
.. |
| 46 |
.. SPDX-License-Identifier: CC-BY-4.0 |
| 47 |
|
| 48 |
Mido - MIDI Objects for Python |
| 49 |
============================== |
| 50 |
|
| 51 |
.. image:: https://img.shields.io/badge/License-MIT-blue.svg |
| 52 |
:alt: MIT License |
| 53 |
:target: https://github.com/mido/mido/blob/main/LICENSES/MIT.txt |
| 54 |
|
| 55 |
.. image:: https://img.shields.io/pypi/v/mido.svg |
| 56 |
:alt: PyPi version |
| 57 |
:target: https://pypi.org/project/mido |
| 58 |
|
| 59 |
.. image:: https://img.shields.io/pypi/pyversions/mido.svg |
| 60 |
:alt: Python version |
| 61 |
:target: https://python.org |
| 62 |
|
| 63 |
.. image:: https://pepy.tech/badge/mido |
| 64 |
:alt: Downloads |
| 65 |
:target: https://pepy.tech/project/mido |
| 66 |
|
| 67 |
.. image:: https://github.com/mido/mido/workflows/Test/badge.svg |
| 68 |
:alt: Test status |
| 69 |
:target: https://github.com/mido/mido/actions |
| 70 |
|
| 71 |
.. image:: https://readthedocs.org/projects/mido/badge/?version=latest |
| 72 |
:alt: Docs status |
| 73 |
:target: https://mido.readthedocs.io/ |
| 74 |
|
| 75 |
.. image:: https://api.reuse.software/badge/github.com/mido/mido |
| 76 |
:alt: REUSE status |
| 77 |
:target: https://api.reuse.software/info/github.com/mido/mido |
| 78 |
|
| 79 |
.. image:: https://www.bestpractices.dev/projects/7987/badge |
| 80 |
:alt: OpenSSF Best Practices |
| 81 |
:target: https://www.bestpractices.dev/projects/7987 |
| 82 |
|
| 83 |
Mido is a library for working with MIDI messages and ports: |
| 84 |
|
| 85 |
.. code-block:: python |
| 86 |
|
| 87 |
>>> import mido |
| 88 |
>>> msg = mido.Message('note_on', note=60) |
| 89 |
>>> msg.type |
| 90 |
'note_on' |
| 91 |
>>> msg.note |
| 92 |
60 |
| 93 |
>>> msg.bytes() |
| 94 |
[144, 60, 64] |
| 95 |
>>> msg.copy(channel=2) |
| 96 |
Message('note_on', channel=2, note=60, velocity=64, time=0) |
| 97 |
|
| 98 |
.. code-block:: python |
| 99 |
|
| 100 |
port = mido.open_output('Port Name') |
| 101 |
port.send(msg) |
| 102 |
|
| 103 |
.. code-block:: python |
| 104 |
|
| 105 |
with mido.open_input() as inport: |
| 106 |
for msg in inport: |
| 107 |
print(msg) |
| 108 |
|
| 109 |
.. code-block:: python |
| 110 |
|
| 111 |
mid = mido.MidiFile('song.mid') |
| 112 |
for msg in mid.play(): |
| 113 |
port.send(msg) |
| 114 |
|
| 115 |
|
| 116 |
Full documentation at https://mido.readthedocs.io/ |
| 117 |
|
| 118 |
|
| 119 |
Main Features |
| 120 |
------------- |
| 121 |
|
| 122 |
* convenient message objects. |
| 123 |
|
| 124 |
* supports RtMidi, PortMidi and Pygame. New backends are easy to |
| 125 |
write. |
| 126 |
|
| 127 |
* full support for all 18 messages defined by the MIDI standard. |
| 128 |
|
| 129 |
* standard port API allows all kinds of input and output ports to be |
| 130 |
used interchangeably. New port types can be written by subclassing |
| 131 |
and overriding a few methods. |
| 132 |
|
| 133 |
* includes a reusable MIDI stream parser. |
| 134 |
|
| 135 |
* full support for MIDI files (read, write, create and play) with |
| 136 |
complete access to every message in the file, including all common |
| 137 |
meta messages. |
| 138 |
|
| 139 |
* can read and write SYX files (binary and plain text). |
| 140 |
|
| 141 |
* implements (somewhat experimental) MIDI over TCP/IP with socket |
| 142 |
ports. This allows for example wireless MIDI between two |
| 143 |
computers. |
| 144 |
|
| 145 |
* includes programs for playing MIDI files, listing ports and |
| 146 |
serving and forwarding ports over a network. |
| 147 |
|
| 148 |
|
| 149 |
Status |
| 150 |
------ |
| 151 |
|
| 152 |
1.3 is the fourth stable release. |
| 153 |
|
| 154 |
This project uses `Semantic Versioning <https://semver.org>`_. |
| 155 |
|
| 156 |
|
| 157 |
Requirements |
| 158 |
------------ |
| 159 |
|
| 160 |
Mido requires Python 3.7 or higher. |
| 161 |
|
| 162 |
|
| 163 |
Installing |
| 164 |
---------- |
| 165 |
|
| 166 |
:: |
| 167 |
|
| 168 |
python3 -m pip install mido |
| 169 |
|
| 170 |
Or, alternatively, if you want to use ports with the default backend:: |
| 171 |
|
| 172 |
python3 -m pip install mido[ports-rtmidi] |
| 173 |
|
| 174 |
See ``docs/backends/`` for other backends. |
| 175 |
|
| 176 |
|
| 177 |
|
| 178 |
Source Code |
| 179 |
----------- |
| 180 |
|
| 181 |
https://github.com/mido/mido/ |
| 182 |
|
| 183 |
|
| 184 |
License |
| 185 |
------- |
| 186 |
|
| 187 |
Mido is released under the terms of the `MIT license |
| 188 |
<http://en.wikipedia.org/wiki/MIT_License>`_. |
| 189 |
|
| 190 |
|
| 191 |
Questions and suggestions |
| 192 |
------------------------- |
| 193 |
|
| 194 |
For questions and proposals which may not fit into issues or pull requests, |
| 195 |
we recommend to ask and discuss in the `Discussions |
| 196 |
<https://github.com/mido/mido/discussions>`_ section. |