Re: De-zipper code?
Posted: Mon Aug 07, 2017 10:04 am
Interesting. Using a hop of any size would mean the smoother doesn't react to changes in the input immediately though right?
DSP Robotics and FlowStone Graphical Programming Software Support and Forums
https://dsprobotics.com/support/
Mine was made for a specific fixed purpose. For different smoothing you would need n x single sample delays and multiply by 1/(n+1) for correct averaging.Perfect Human Interface wrote: I think Spogg's might be too subtle to visualize.
Yes. Hop(x) means, it omits x samples. hop(2048) means active on sample 0, sample 2048, sample 4096, sample 6144, sample 8192, etc.Perfect Human Interface wrote:Interesting. Using a hop of any size would mean the smoother doesn't react to changes in the input immediately though right?
Code: Select all
streamin i;
streamin duration;
streamout o;
float samplerate = 44100;
float coef;
float last;
float step;
coef = 1 / (duration / 1000 * samplerate);
step = step + (last != i) & (coef * (i - o) - step);
o = o + (step < 0) & (max(o + step, i) - o);
o = o + (step > 0) & (min(o + step, i) - o);
last = i;