Hi guys! What's up?!
I really need your help because I'm freaking out on this point!
My goal is: to get the pressure of a Force Sensitive Resitor (Pressure Sensor) and use it as velocity for a MIDI note.
I already did this:
thumblval = analogRead(thumb);
*43 is the note, >50 is the lowest value limit, 127 and 0 are the two velocity that I associated to have the NoteOn - NoteOff effect.
This code works perfectly but as you can see the velocity in output is always 127. Every other test i did gives some problems like: continuous triggers of the note or something like that.
I just need to associate to one note one velocity value and the input should stop only when I stop pushing (with the velocity being steady during that time).
I hope I was clear enough and I say thanks in advance to everybody out there!
Try replacing 127 with thumbval:
And one more thing. After reading thumbval, constrain it to 127 or less:
if thumbval > 127
.... I'm not 100% sure that will work, but it might help.