c0redumb / midi2vjoy

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

Korg NanoControl 2 unmappable sliders #5

Open skombijohn opened 4 years ago

skombijohn commented 4 years ago

Hi,

I just discovered this brilliant python programm searching for a way to use my NanoControl as a "joystick".

The nanocontrol has buttons, rotary knobs and some sliders. https://www.korg.com/de/products/computergear/nanokontrol2/index.php

While testing it with -t, I noticed that the sliders are reported as neither axis (176 = 0xB0) nor button(144 = 0x90) but with own unique messages..

0xB0 is a Control Change on Channel 0, with the controller number being the second byte and the value of the controller being the third byte, so the rotaries are normal Midi CCs. 0x90 is a NoteOn event, where the NanoKontrol outputs different note "pitches" for different buttons using velocity 127 for press and 0 for release.

The sliders though are "pitch wheels" from the Midi perspective. Pitch wheel messages are starting with Ex where x is the channel number, and the 2nd and third bytes are the LSB and MSB of the wheel's value. The 8 sliders of the NanoKontrol are reported as E0 through E7 so they are simple pitch wheels on different channels. The LSB / MSB handling though is weird here as they are always identical. So in the lowest position a slider reports E0 00 00. The tiniest movement reports E0 01 01, the next step being E0 02 02 and so on up to E0 7F 7F. But no messages like E0 05 48 for example..

These are currently unmappable with midi2vjoy..

skombijohn commented 4 years ago

I created a pull request for that issue:

https://github.com/c0redumb/midi2vjoy/pull/6

skombijohn commented 4 years ago

Side note: Some buttons on the nanoControl do behave very weird, as they cause two NoteOn/Off Events for one press.. Also the rotaryKnobs are not mappable, as they are no continues controllers, but send "directional" events, where turning the knob clockwise will cause the same message with the same controller value over and over, until the highest value is reached, indicated by a different controller value. Same in the other direction. The only useful way to map these would be seing them as "buttons" somehow..

henniss commented 4 years ago

skombijohn, the rotary knobs are mappable, but you need to start the nanokontrol2 in CC mode. Hold SET+CYCLE when plugging it in and CYCLE should flash red. Thereafter the knobs report proper slider values.

The sliders also show up with the correct type code (axis, 176) in this mode.

The buttons are weird in this mode, though. They're each reported as an individual axis that's set to 127 when pressed and 0 when released. I'll see if I can find time this weekend to hack something together to fix that.

jasonpatel commented 4 years ago

I have a beatstep device that also goes from 127 to ) on press any luck fixing that one?

[176, 101, 127, 0] - Press [176, 101, 0, 0] - Release

https://www.arturia.com/products/hybrid-synths/beatstep/overview

Nercury commented 3 years ago

Implemented support for nanoCONTROL2 in my fork: https://github.com/Nercury/midi2vjoy It can also map any event to up or down output, so it is more flexible But the config files are now different, so there won't be a PR