randomdrift

random drift with new-value-offset width and output smoothing
Author: Remco van der most
License: BSD
Github: sss/rand/randomdrift.axo

Inlets

None

Outlets

frac32.bipolar random

Parameters

frac32.u.map width

frac32.s.map.lfopitch smooth

Declaration
int32_t rnd1;
int32_t rnd2;
uint32_t smooth;
Control Rate
rnd1 = rnd1 + ___SMMUL(((int32_t)(GenerateRandomNumber())), param_width);
rnd2 = rnd1 > 0 ? rnd1 : -rnd1;

int32_t f;
MTOF(param_smooth, f);
smooth = ___SMMLA((rnd2 - smooth) << 1, f, smooth);

outlet_random = smooth >> 4;

Privacy

© 2024 Zrna Research