The MIDI library supports communication with MIDI controllers and devices. To use it, you need following in your program:
from midi import *
The MIDI library provides two types of objects:
MidiIn objects and MidiOut objects:
- MidiIn objects may be used in your programs to get input from MIDI devices that generate input events (e.g., a MIDI guitar, keyboard, or control surface).
- MidiOut objects may be used in your programs to send output to MIDI devices that accept output events (e.g., an external MIDI synthesizer).
MIDI devices need to be connected (via USB cable) to your computer.
NOTE: If your MIDI device does not have a USB connection, use a MIDI-to-USB adaptor.