We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I'm trying to map a midi controller to change parameters in my sketches. I've installed the ControlP5 library. It seems to have everything I need to make gui buttons and knobs, but how do I map midi to those? Do I need to use the midiBus library in conjunction with ControlP5?
Does anyone have a relatively simple example of this implementation?
Answers
Please check the reference for the following keywords: map() and lerp().
A simple example. If you midi provides a value, let's say volume (you store the value in a variable call inVol) which is a value from 0 to 100%, then you could use the map function to map the input value to the sketch'es height:
Notice that minHeight, the bottom of the screen, is at location Y dictated by height. The top of the sketch is zero. This detail will make sense if you are familiar with processing.
Kf