Control Surface
1.1.1
MIDI Control Surface library for Arduino
|
This is an example of the CCPotentiometer
class of the Control_Surface library, and specifically, how to use the map
function to account for non-linearities of the potentiometer.
The map function in this example corrects for potentiometers that don't go all the way to the extreme values. Some potentiometers still read a value that's greater than 0 when turned all the way to the left. To fix that, tweak the minimumValue
constant. If the potentiometer doesn't read the maximum value when turned all the way to the right, tweak the maximumValue
constant.
Connect the left terminal of the potentiometer to ground, and the right one to VCC.
minimumValue
to this printed value plus some safety margin (add 5%, for example). maximumValue
.Select the Arduino as a custom MIDI controller in your DAW, and use the MIDI learn option to assign the potentiometer to a function.
It will send the MIDI Control Change Channel Volume parameter for channel 1.
Written by Pieter P, 16-06-2019
https://github.com/tttapa/Control-Surface