This week I focused on getting the slides to behave as I want on screen i.e. move smoothly, no glitches or jumpes, no delays.
Problems:
- The linear slides were acting like logarithmic slides (this took me almost the whole day to solve, the problem was the breadboard)
How it should behave…
How it was behaving…
Once I realized the issue, I had a funeral for the breadboard
- It was so glitchy! All the values kept jumping
EXPERIMENT 1: To solve this I tried the Kalman filter. However, the side effect of the filter is a ‘lag’ as the value jumps from one to the next because the filter tries to smoothen the values.
(Change 100 to 127 to fit MIDI scale)EXPERIMENT 2: Track the magnitude of change in the sensor value. If the change is greater than 2, count it as change, otherwise don’t. Since the steps of the digital slides were quite few (less than 127), this worked fine and the results of the movements were smooth.
EXPERIMENT 3: Although the movement transition between physical slide to digital slide is now smooth, sometimes when still, the slides are still glitching. This had to be a wiring effect so I built fitted box prototype of the slides to sit on.
So I got the desired movements in the end:
Next week: focus on the programming
Links to get started on:
- MIDI OSC https://github.com/tigoe/SoundExamples/tree/master/MIDI_examples/OSC_MIDI_oneKey_improviser
- OSC relay https://github.com/viztopia/osc-relay
- Software (PRESS “a” TO PLAY) https://editor.p5js.org/nt1475@nyu.edu/embed/CxeOVOah