I want to write a MIDI effect in Python -- something that can listen to my keyboard input, add a harmony*, and output both to Live. All my problems would be solved by a trivially simple piece of example code, one that just adds another note a halfstep up, or transposes its input an octave, or whatever. I could do the rest of it myself -- I can write basic Python but I'm failing to get a handle on MIDI input/output.
I installed PythonMIDI (https://github.com/vishnubob/python-midi/) and not even its own tests would run. I installed portmidizero to discover it requires portmidi; I tried installing portmidi and could not figure it out. I tried PyMIDI but it cannot output MIDI, only input it.
I expect processing the notes to be difficult enough. Does anybody know of an easy way to input and output them?
I use a Mac.
Python MIDI I/O
Re: Python MIDI I/O
Try to use
https://pypi.python.org/pypi/python-rtmidi/
It should be installable via pip as long as you have XCode on your machine. You may also want to have a look into the code of a small command line utility that i wrote using this library:
https://github.com/sourcebox/midiutil
https://pypi.python.org/pypi/python-rtmidi/
It should be installable via pip as long as you have XCode on your machine. You may also want to have a look into the code of a small command line utility that i wrote using this library:
https://github.com/sourcebox/midiutil
-
- Posts: 85
- Joined: Wed Nov 07, 2007 5:18 am
Re: Python MIDI I/O
Thank you so much. I hope to try this tonight.