diginoise

bandpass filtered sampled noise Range -64..64
Author: Remco van der Most
License: BSD
Github: sss/noise/diginoise.axo

Inlets

frac32buffer rate

frac32buffer cut

Outlets

frac32buffer.bipolar white noise

Parameters

frac32.s.map.pitch cut

frac32.u.map rate

Declaration
int32_t count;
int32_t random;
int32_t filter1;
int32_t filter2;
int32_t filter3;
int32_t filter4;
Audio Rate
int32_t rate = (1 << 27) - param_rate - inlet_rate;
rate = rate < 0 ? 0 : rate;
rate = ___SMMUL(rate << 3, rate << 2);
rate = ___SMMUL(rate << 3, rate << 2);
rate = rate >> 20;
int32_t cut;
MTOF(param_cut + inlet_cut, cut)

count += 1;
count = count > rate ? 0 : count;
if (count == 0) {
  random = (int32_t)(GenerateRandomNumber()) >> 5;
}
filter1 = __SMMLA((random - filter1) << 1, cut, filter1);
filter2 = __SMMLA((filter1 - random - filter2) << 1, cut, filter2);
filter3 = __SMMLA((filter2 - filter3) << 1, cut, filter3);
filter4 = __SMMLA((filter3 - filter2 - filter4) << 1, cut, filter4);

outlet_wave = filter4;

Privacy

© 2024 Zrna Research