import("stdfaust.lib");
// sm.smooth
SMOOTH_TIME_SECS = 0.004;
SMOOTH_TIME_SAMPLES = SMOOTH_TIME_SECS * ma.SR;
timeSmooth(secs) = si.smooth(ba.tau2pole(secs));
selectSmooth(s) = ba.selectmulti(SMOOTH_TIME_SAMPLES, ((_,!), (!,_)), s);
smooth = timeSmooth(SMOOTH_TIME_SECS);
bypassSmooth(bpc, e) = _,_ : ba.bypass_fade(SMOOTH_TIME_SAMPLES, bpc, e);
// anotherSmooth
anotherSmooth = _ : tick ~ (_) with {
tick(smoothedValue, value) = smoothedValue + smoothedDifference
with {
smoothedDifference = (value - smoothedValue) / 4;
};
};
// quickSmoo
smoothSamples(samples) = si.smooth(ba.tau2pole(samples / ma.SR));
quickSmoo = smoothSamples(ma.BS * 3);
process = os.sawtooth(50) <: _, anotherSmooth, smooth, quickSmoo, si.smoo;


```
import("stdfaust.lib");
// sm.smooth
SMOOTH_TIME_SECS = 0.004;
SMOOTH_TIME_SAMPLES = SMOOTH_TIME_SECS * ma.SR;
timeSmooth(secs) = si.smooth(ba.tau2pole(secs));
selectSmooth(s) = ba.selectmulti(SMOOTH_TIME_SAMPLES, ((_,!), (!,_)), s);
smooth = timeSmooth(SMOOTH_TIME_SECS);
bypassSmooth(bpc, e) = _,_ : ba.bypass_fade(SMOOTH_TIME_SAMPLES, bpc, e);
// anotherSmooth
anotherSmooth = _ : tick ~ (_) with {
tick(smoothedValue, value) = smoothedValue + smoothedDifference
with {
smoothedDifference = (value - smoothedValue) / 4;
};
};
// quickSmoo
smoothSamples(samples) = si.smooth(ba.tau2pole(samples / ma.SR));
quickSmoo = smoothSamples(ma.BS * 3);
process = os.sawtooth(50) <: _, anotherSmooth, smooth, quickSmoo, si.smoo;
```