0

I need to 'smooth' OSC input data without introducing any latency , ie remove spikes. The only strategy I can think of is to store the preceding sample, compare with the current and if the current is different from the previous by more than some 'delta' value, then ignore it. Although I'm using Actionscript, the same principles should apply regardless.

Can anyone suggest any alternative strategies?

Bachalo
  • 6,965
  • 27
  • 95
  • 189

1 Answers1

0

Ideas off the top of my head:

  • Check new value with previous value and cast away outliers (≥ delta away).
  • Check new value with average of previous N values (e.g. 10).
  • Smooth entire curve with biased running average, where the avg is your value at each point. avg = (1 - T)*avg + T*newValue