Page 1 of 1

Difference between "Average" and "Smooth" modifiers?

Posted: Mon Oct 16, 2017 9:57 am
by Terry Payman
The rectangular time window and processing for the Average modifier is explained in detail in the User's Guide. I'm wondering how the Smooth modifier differs.

To date I never felt the need for more smoothness than the Average modifier gave me, but suspect I'm missing something more than a Smooth value of 1.0 meaning it's locked at the most recent value.

Re: Difference between "Average" and "Smooth" modifiers?

Posted: Mon Oct 16, 2017 2:30 pm
by Magic
The difference is the algorithm. I'm not sure if I could explain it without getting into the math -- how much detail are you looking for? :ugeek:

Re: Difference between "Average" and "Smooth" modifiers?

Posted: Mon Oct 16, 2017 2:59 pm
by Terry Payman
Eric wrote:The difference is the algorithm. I'm not sure if I could explain it without getting into the math -- how much detail are you looking for? :ugeek:
The math would be fine thanks!

Edit:
I'm particularly interested in the time window over which the smoothing is applied, whether the window is rectangular as with the Average modifier, whether the response is linear with amplitude and whether outlier samples are filtered. If I have an algorithm or a few lines of code that would be a good start.

Re: Difference between "Average" and "Smooth" modifiers?

Posted: Mon Oct 16, 2017 3:16 pm
by Magic
The function is s * p + (1 - s) * v, where s is the smoothing factor, p is the value from the previous frame, and v is the value from the current frame. Therefore if s is closer to 1, you get more smoothing because the previous value is emphasized, and if s is closer to 0, you get less smoothing because the current value is emphasized.

Re: Difference between "Average" and "Smooth" modifiers?

Posted: Wed Oct 18, 2017 12:21 am
by Terry Payman
Thanks Eric. All is now clear.

I made a Magic oscillograph project to illustrate the differences between Average and Smooth.
Average vs Smooth.png
Average vs Smooth.png (46.83 KiB) Viewed 7778 times

Re: Difference between "Average" and "Smooth" modifiers?

Posted: Wed Oct 18, 2017 1:05 am
by Magic
Fun! :P

Re: Difference between "Average" and "Smooth" modifiers?

Posted: Fri Nov 03, 2017 1:57 pm
by DemBambiSeiMudder
Hey Terry,
the oscillograph is awesome.
I thought I knew the difference, but this makes it so much more clear!
Thank you :-D

Re: Difference between "Average" and "Smooth" modifiers?

Posted: Sat Nov 04, 2017 11:34 am
by Terry Payman
DemBambiSeiMudder wrote:the oscillograph is awesome... this makes it so much more clear!
Thank you :-D
Thanks! :D

Re: Difference between "Average" and "Smooth" modifiers?

Posted: Mon Dec 04, 2017 3:44 pm
by Slavi
DemBambiSeiMudder wrote:Hey Terry,
the oscillograph is awesome.
I thought I knew the difference, but this makes it so much more clear!
Thank you :-D
+1 more for Terry's visualiastion. Makes much more sence now :mrgreen: