I don't really understand what you are doing.
if(tempVal == 0) {
MIDI.sendControlChange(123,0,1); // OMNI NOTE OFF MSG
digitalWrite(led, LOW);
}
if(tempVal !=0) {
If tempVal is not 0, how can it be anything other than not 0? The 2nd if statement should be an else.
posVal = tempVal;
posVal = map(posVal, 1023, 1, 127, 0); // make midi notes
posVal = constrain(posVal, 0, 127); // constrain it
Why? You never use posVal anywhere else.
Now that that works I need to figure out how to release it so that I can slide my finger over the ribbon triggering notes form a scale.
Pressing somewhere else/some other amount should generate another non-zero value.