Module musx.midi

A package providing full support for reading and writing data to midi files and ports. The module has several layers:

  • midimsg.py : a functional interface for creating low-level midi message lists.
  • midievent.py : an object oriented layer above midimsg.py that represents midi data as class instances with attributes time and message.
  • midifile.py : reads and writes data to midi files.
Expand source code
"""
A package providing full support for reading and writing data to midi files
and ports. The module has several layers:

* midimsg.py : a functional interface for creating low-level midi message lists.
* midievent.py : an object oriented layer above midimsg.py that represents
midi data as class instances with attributes time and message.
* midifile.py : reads and writes data to midi files.
"""

from .midimsg import *
from .midifile import *
from .midievent import *

Sub-modules

musx.midi.gm

Defines constants for GM instruments, controllers and drum map values, and dictionaries for reverse mapping to names. Names are sanitized for Python …

musx.midi.midievent

The midievent module provides object oriented support for working with midi messages. To represent basic midi on and off data you should use a Note

musx.midi.midifile

The midifile module provide support for reading and writing midi files.

musx.midi.midimsg

A module that defines low level constructors and accessors for manipulating lists of bytes as midi messsages.