We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello! I frequently like to play with changing the parameters of my sketches, and after experimenting a little I came up with a good solution using the MIDI controller Launch Control, which has 16 knobs and 8 pads. Useful when you want to fine tune your sketch, or make something interactive without polluting the screen with the GUI controls. Probably useful for VJs too :D The library provides events for when the values of knobs and pads have changed, during which you can e.g. adjust variables:
void launchControllerKnobChanged(KNOBS knob) {
println("Launch Control knob changed: " + knob.name());
//maps r to the value of the first knob
//getKnobMap() is the same as:
//r = map(controller.getKnob(KNOBS.KNOB_1_HIGH), 0, 127, 100,500);
r = controller.getKnobMap(KNOBS.KNOB_1_HIGH,100,500);
m = controller.getKnobMap(KNOBS.KNOB_2_HIGH,0,100);
lat_start = controller.getKnobMap(KNOBS.KNOB_3_HIGH,-HALF_PI,0);
lat_end = controller.getKnobMap(KNOBS.KNOB_4_HIGH,0,HALF_PI);
lon_start = controller.getKnobMap(KNOBS.KNOB_5_HIGH,-PI,0);
lon_end = controller.getKnobMap(KNOBS.KNOB_6_HIGH,0,PI);
}
The source code is at https://github.com/haschdl/pLaunchController
Comments
Hi! Thank you for sharing! May i ask you a question? Is this library may be used only for this MIDI controller? I copy the library, but Processing still don't see it. Or maybe the problem is because i have Novation Control XL MK2? Thank you!
Hello @olyaionina! Unfortunately the current implementation works only with the Novation Launch Control (something in my code makes it work only if the MIDI controller is called "Novation LaunchControl"). What I can do is to remove the name of the device, and maybe something will work :D If you'd like to try that, please send me a private message ok? I can create a separate version on the code in Github.
If you are trying to get this working with any MIDI controller, and not that specific one, you can use the library TheMIDIbus.
Install from PDE Contributions Manager, or from http://www.smallbutdigital.com/projects/themidibus/
Header:
In
setup()
:Generic event handler function:
Tested with a Korg nanoKontrol and nanoKontrol2.