Quote:
Originally Posted by mrelwood
I thought like that at first as well. But I think the center point is meaningless. The code can only average the samples after they have all been stored, and it can only output the result once new samples will no longer affect the result. So it should always calculate the average from the sample ”now” backwards to "slider1" samples ago. It doesn’t matter wether it averages 2 or 3 samples, it will still store the latest sample and output the average of all samples.

Hi and thanks for explaining. I really have a lot to learn...
Back to the Gaussian Averaging. The idea was to look ahead in time in order to get phase linearity. ie. The midpoint of the averaging to line up with the current sample. If you cant  then theres not much point. But never mind. Ive got other ideas Id like to try
Lets try an exponential smoothing filter with an extra smoothing tail? The math goes like this
[0] * 0.1 + [1] * 0.9
+ ( [1]  [2] * 0.5
This presumes that [x] is the buffer number with zero being current sample. Its basically adding 10% of the current sample to 90% of the buffer [1]. Plus a subtracting of the buffer [2] from [1] times 0.5
The actual multiplication numbers are supposed to be adjustable. These are just examples to get things going.
Best regards /danerius