Skip to content

Instantly share code, notes, and snippets.

@mandymozart
Created June 14, 2012 12:34
Show Gist options
  • Save mandymozart/2930012 to your computer and use it in GitHub Desktop.
Save mandymozart/2930012 to your computer and use it in GitHub Desktop.
Controller Change MidiTest with RWMidi for Korg NanoKontrol & NanoPad (y axis malfunctioning
import rwmidi.*;
MidiInput nanoCntrl, nanoPad;
void setup() {
// Midi
// Show available MIDI output devices here
MidiInputDevice devices[] = RWMidi.getInputDevices();
for (int i = 0; i < devices.length; i++) {
println(i + ": " + devices[i].getName());
}
// Select Input Device
nanoCntrl = RWMidi.getInputDevices()[0].createInput(this);
nanoPad = RWMidi.getInputDevices()[1].createInput(this);
}
void controllerChangeReceived(rwmidi.Controller cntrl){
println("CC"+cntrl.getCC()+"/"+cntrl.getValue());
// nanoPad does not send trigger any CC event on it's x-axis.
// CC1 is coming in for y-axis
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment