I noticed that about the reversing. For my application I needed to go faster or slower but never backwards, so I changed your example code for the knob read like this:
Code:
if (newsensorValue != sensorValue) {
sensorValue = newsensorValue;
PitchAmount = (sensorValue + 255) / 512.0;
I just basically futzed with the numbers until I was able to get it where I wanted it... But that does bring up 1 question that I had: I wasn't able to get that to work by doing a simple map. For instance this:
Code:
double rate = map(sensorValue, 0, 1023, -0.99, 0.99);
didn't seem to work... maybe due to the negative numbers?
Also is it possible to use this with the onboard memory? Like if I encode the RAW file into .cpp/.h files?
Thanks again!
EDIT: just tried this:
Code:
PitchAmount = map(sensorValue, 0, 1023, 0.5, 2.5);
it seemed to play high pitched, in the middle and not at all... was weird.