dipper

Quantizable "starving" distortion The incoming signal will be quantized into stages and at each stage the signal's amplitude gets "starved" and dives back towards zero. Dive-rate can be controlled "mod1" sets the size of the stages, fully clockwise would be 1 stage only->no change. Lowering the control will make the stages smaller and smaller, adding more and more stages and overtones. At each quantize-crossing a "dip" will be created, like a saw returning to zero. The rate of this change can be controlled using both "damp" and "rate". Rate controls a clipper that clips the linear change of the signal. Damp controls the cutoff of a filter that then damps the linearly clipped signal before subtracting it from the original signal before sending it to the output.
Author: Remco van der Most
License: BSD
Github: sss/dist/dipper.axo

Inlets

frac32buffer in

frac32 mod

frac32 damp

frac32 rate

Outlets

frac32buffer out

Parameters

frac32.u.map mod

frac32.u.map rate

frac32.s.map.pitch damp

Declaration
int32_t O1;
int32_t prev;
int32_t cap1;
int32_t cap2;
Init
SINE2TINTERP(1 << 30, O1)
Control Rate
int32_t damp;
MTOF(param_damp + inlet_damp, damp)
int32_t Rate = param_rate + inlet_rate;
int32_t mod = param_mod + inlet_mod;
Audio Rate
int32_t in = inlet_in;
int32_t comp;
int32_t offs;
comp = in / (mod + 1) * (mod + 1);

int32_t rate = (comp - cap1) << 1;
rate = rate > Rate ? Rate : rate;
rate = rate < -Rate ? -Rate : rate;
cap1 = ___SMMLA(rate, damp, cap1);

outlet_out = in - cap1;
prev = inlet_in;

Privacy

© 2024 Zrna Research