0

I am trying to smooth out a serie of values that represents tempo values, depicted in blue.

The data comes from a tempo detection algorithm that as you might have guessed is not the best in town, the expected tempo is 126 (depicted in red) but the algorithm is fooled by double beats hence the erratic values.

I've tried to use a moving average (depicted in green), while the average value stabilizes over time it tends to go up to about 170.

Do you know whether there's a magic formula that would allow to closely follow the red line ?

enter image description here

EDIT : using median

enter image description here

  • Have you tried median? It is less susceptible to local variations. You can start with a relatively short window and increase the size gradually, at some point switching to averages. –  Feb 14 '14 at 15:19
  • I'll give it a try and post my results back here. – Eric Cartman Feb 14 '14 at 15:45
  • It's a little better with median, the thing is I don't really know when/how to 'switch' to average so what I did is I clamped values : if it's greater than median then it becomes median. – Eric Cartman Feb 14 '14 at 16:51

0 Answers0