rtmidi-python
rtmidi-python copied to clipboard
Type error with python3
Hi, First I would like to thank you for this wonderful project. I'm just learning python and I'm writing a script which enable a complete control of the Novation Launchpad S midi-controller's lights on Linux. The rtmidi-python module works with python 2.7. But I've an issue with python 3.2 when creating the MidiOut / MidiIn object :
import rtmidi_python as rtmidi midi_out = rtmidi.MidiOut() Traceback (most recent call last): File "
", line 1, in File "rtmidi_python.pyx", line 111, in rtmidi_python.MidiOut.cinit (rtmidi_python.cpp:2088) TypeError: expected bytes, str found
What I have to do ?
I don't know how to fix this in the code, but I figured out a workaround. Try this: midi_out = rtmidi.MidiOut(b'out')
Thank you that works !