Help! Which Version of rtmidi Do I Need for an Old Python Game?

0
0
Asked By CoolCat1234 On

I'm working on getting MIDI input to function in a pretty old Python 2.7 game that uses pygame 1.9.6. The game specifically requires the 'rtmidi' module, but I'm having trouble figuring out exactly which version it needs.

The game's API relies on these specific calls:
- `import rtmidi`
- `.RtMidiOut()`
- `.RtMidiIn()`
- `.getPortCount()`
- `.openPort()`
- `.getMessage()`

This means I can't use 'rtmidi-python' or 'python-rtmidi' since those rely on different methods (.MidiOut and .MidiIn). I've also tried multiple versions of 'rtmidi' that match the API requirements, but the game crashes on startup with a 'TypeError: object of type 'NoneType' has no len()' error.

1 Answer

Answered By TechieTurtle On

You might want to check out pyrtmidi on GitHub. It's based on the RtMidi API and seems to fit what you're looking for.

CuriousCoder -

I tried pyrtmidi from PyPI, but the game wouldn't start and gave me a 'TypeError: object of type 'NoneType' has no len()' error.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.