Fix for jittery pots, encoders, or faders

gabriels

2016-09-04 22:08:50

My solution for jittery pots may be a no-brainer, but I thought I'd post it anyway in case someone else has a similar problem. Also there's probably a more elegant or effective solution, and I'm hoping someone could share that.

My approach is as follows:
qq=ga-1
rr=ga+1
if pp==qq then exit rules, skip Outgoing Action
if pp==rr then exit rules, skip Outgoing Action
ga=pp

Where data (pp) from a pot is stored in Global variable ga.
In effect, I :
- subtract one from the incoming pot data and store it in local variable qq,
- add one to the incoming pot data and store it in local variable rr.
- compare each of the two local variables against the value previously stored in global ga.
- if either of the local variables is the same as the stored value of ga, I exit and skip execution.

The reason I needed to do this is that I use fader movements that control volume faders in Ableton tracks, but at the same time, if a fader value changes, it forces Ableton to bring that track's clip view into focus, and to light LEDs on my controller showing that that track is either cued or actively playing. If a stray jitter from a pot shifts focus to a track that's not really active, or hasn't intentionally been changed, and this lights irrelevant LEDs, that's not so good.

Maybe someone has a better way of doing this? Of course, I could expand the comparisons to include subtracting and adding 2 instead of 1, etc.
Thanks,
Gabriel

florian

2016-09-13 23:55:29

looks like a nice solution to me!
Thanks for sharing.
Florian