Skip to main content

Python MIDI constants.

Project description

midi_const

Python MIDI constants

This very simple package provides useful constants derived from official MIDI specifications available at:

Status

Already covers most of the MIDI 1.0 Detailed Specification v4.2.1 from February 1996.

Other specifications will be added along the way.

Contributions welcome!

License

To allow maximal re-usability, these constants are offered, at your option, under any of the following licenses:

  • CC0-1.0
  • MIT (OSI and FSF compatible)
  • Unlicense

Installation

pip install midi_const

Usage

Interactively:

>>> import midi_const as midi

>>> midi.STATUS_BYTES.get(0x80)
'Note Off'

>>> midi.CONTROLLER_NUMBERS.get(7)
'Channel Volume'

>>> midi.SMF_DEFAULT_TEMPO
500000.0

>>> help(midi)

Within a program:

from midi_const import GENERAL_MIDI_SOUND_SET, GENERAL_MIDI_SOUND_SET_GROUPINGS

index = GENERAL_MIDI_SOUND_SET.index('Banjo')
# index = 105
group = GENERAL_MIDI_SOUND_SET_GROUPINGS.get(index)
# group = 'Ethnic'

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

midi_const-0.1.0.post1.tar.gz (21.9 kB view hashes)

Uploaded Source

Built Distribution

midi_const-0.1.0.post1-py2.py3-none-any.whl (18.3 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page