Hello all…
how would I go about using the full span of a potentiometer.
my project is a midi controller and I want to add 2 Pot Knobs to change the midi messages being sent from a button/finger drum pad.
This is the code that i have so far. I have tryed a few different versions but have not been successful in dividing the pot into the amount of midi messages in the array to then catch that number when the pot is turned.
in a perfect world I will eventually have all of the midi messages as a scroll able array so to speak.
A Corse Pot knob to get to the general message and a fine tune Pot knob to set a variable eg. velocity, after touch length, pitchbend
Now that i look at the code i can tell i am far off. The bit of code i have would be applyed to the fine tune pot.
Im still clueless on how to get full use of the potentiometer to scroll through all 8 sections of the array.
Can anybody help?
String cmds[8] = "Note On, Note Off, After Touch, Continuous Controller, Patch Change, Channel Pressure, Pitch Bend, Non-Musical Commands";
int val = analogRead(CMDpotPin);
if ((val > 128) && (val < 255)) {
if (val > 144) {
Serial.println("NoteOn ");
Serial.println(val);
}
Serial.println("NoteOff ");
Serial.println(val);
}[code/]