5
17
Fork
You've already forked EQUIS
5

Smooth parameter changes quicker #25

Merged
obsoleszenz merged 2 commits from fix_smoothing into main 2024年02月15日 04:02:56 +01:00

image
image

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;
![image](/attachments/3870fc6d-21b3-4c65-94a2-4417e08e49be) ![image](/attachments/09338d7b-9b34-44ac-9ff8-13d002dbe913) ``` 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; ```
Sign in to join this conversation.
No reviewers
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
OpenDJLab/EQUIS!25
Reference in a new issue
OpenDJLab/EQUIS
No description provided.
Delete branch "fix_smoothing"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?