c0redumb / midi2vjoy

MIDI to virtual joystick mapping
BSD 2-Clause "Simplified" License
96 stars 31 forks source link

Support Behringer X-Touch Mini, fix button numbers #8

Open topeju opened 4 years ago

topeju commented 4 years ago

The Behringer X-Touch Mini appears to output its slider and rotational encoders using key 186 instead of 176, and its button down events are 154 and button up events are 138. I added support for these codes in midi2vjoy.py, along with a sample config file for the controller.

I also noticed that in the SetBtn call, the button in opt[1] was being passed as a character (e.g. '1' or 0x31 instead of 0x01), which was quite contrary to what is implied, so I added parsing opt[1] into an int.

KO0I commented 3 years ago

Oh, your PR is getting my juices going, maybe if/when your fix is put in, I can help support some Korg hardware which has its own quirks of enumerating the m_type of its events.