I had done simple midi ribbon controller and I need to do something with reading values from soft pot strip. I have problem with linearity or simple said “note placement on ribbon”
Ribbon potentiometer is 500mm long and have 20k resistance.
analogRead mapping is 0-1023 on A3 input.
I can play 2 octaves from C2 to C4 on ribbon.
Notes placement is really problematic, because distance between notes is not equal. By this, ribbon is not really playable.
For example on beginning ribbon, first 100mm placement notes is stretched and next to next ones, distance between notes is smaller and smaller. Firsts notes have 20mm per note space on ribbon and next ones 15mm and 10mm and so on.
I need get proper equal placement of notes on ribbon. Ribbon has 500mm, and 25 notes can be played. I need to get 20mm per note. 500/25=20 or even 500/25=20 - 1
-1 for space 1mm between notes.
How I can do it? Any specific functions can be useful for that?
int positionSensorPin = A3
int positionSensor;
int ribbon;
positionSensor = analogRead(positionSensorPin);
ribbon = map(positionSensor,0,1023,0,127);
//need function for note equal placement
Ribbon potentiometer is 500mm long and have 20k resistance.
analogRead mapping is 0-1023 on A3 input.
I can play 2 octaves from C2 to C4 on ribbon.
Notes placement is really problematic, because distance between notes is not equal. By this, ribbon is not really playable.
For example on beginning ribbon, first 100mm placement notes is stretched and next to next ones, distance between notes is smaller and smaller. Firsts notes have 20mm per note space on ribbon and next ones 15mm and 10mm and so on.
I need get proper equal placement of notes on ribbon. Ribbon has 500mm, and 25 notes can be played. I need to get 20mm per note. 500/25=20 or even 500/25=20 - 1
-1 for space 1mm between notes.
How I can do it? Any specific functions can be useful for that?
int positionSensorPin = A3
int positionSensor;
int ribbon;
positionSensor = analogRead(positionSensorPin);
ribbon = map(positionSensor,0,1023,0,127);
//need function for note equal placement