Table of Contents

Python midi

Midi I/O using Python3.

Setup

Install Python rtmidi globally on Debian.

sudo apt install python3-rtmidi

Test

mkdir -p ~/src && cd ~/src
git clone https://github.com/SpotlightKid/python-rtmidi
cd python-rtmidi/examples
python3 sequencer/sequencer.py
Creating MidiOut object.
Do you want to create a virtual MIDI output port? (y/N) n
Available MIDI ports:

[0] Midi Through:Midi Through Port-0 14:0
[1] Origin25:Origin25 MIDI 1 16:0
[2] E-MU XMidi2X2:E-MU XMidi2X2 Midi Out 1  20:0
[3] E-MU XMidi2X2:E-MU XMidi2X2 Midi Out 2  20:1

Select MIDI output port (Control-C to exit): 3
Opening MIDI output port #3 (E-MU XMidi2X2:E-MU XMidi2X2 Midi Out 2  20:1).
This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies