noiseOsc

noise oscillator with noise-update rate in semitones (oscillator pitch), tone (phase octaver for noise update) and cut (BP-filter depending on both pitch and cut parameters)
Author: Remco van der Most
License: BSD
Github: sss/noise/noiseOsc.axo

Inlets

frac32 pitch

frac32 cut

Outlets

frac32buffer.bipolar white noise

Parameters

frac32.s.map.pitch pitch

int32 tone

frac32.s.map cut

Declaration
int32_t rnd;
uint32_t phase;
int ttrig;
int32_t val1;
int32_t val2;
int32_t val3;
int32_t val4;
Control Rate
int32_t freq;
MTOFEXTENDED(param_pitch + (inlet_pitch), freq)
int32_t f1;
MTOF(param_pitch + param_cut + ((inlet_pitch + inlet_cut)), f1);
Audio Rate
phase += freq;
if (phase > (1 << (52 - param_tone))) {
  phase = 0;
  rnd = (GenerateRandomNumber() >> 2) - (1 << 29);
}
val1 = ___SMMLA(((rnd >> 1) - val1) << 1, f1, val1);
val2 = ___SMMLA((val1 - val2) << 1, f1, val2);
val3 = ___SMMLA((val2 - val3) << 1, f1, val3);
val4 = ___SMMLA((val2 - val3 - val4) << 1, f1, val4);
outlet_wave = (val2 - val3 - val4) << ((31 - (52 - param_tone)) >> 2);

Privacy

© 2024 Zrna Research