diracSines

Dual sine generator, using the positive dirac-difference part of the incoming audio for generating a "sine" for output1 and the negative direc-difference for generating a "sine" for output2. you can mix the outputs with the original audio for sine-based wave-distortion
Author: Remco van der Most
License: BSD
Github: sss/dist/diracSines.axo

Inlets

frac32buffer phase

Outlets

frac32buffer.bipolar sine wave

frac32buffer 2

Parameters

frac32.s.map 1

frac32.s.map 2

int32 rate

Declaration
uint32_t Phase1;
uint32_t Phase2;
int32_t diff;
int32_t prev;
Audio Rate
int32_t in = inlet_phase << 5;
diff = (in - prev) << param_rate;
Phase1 += diff > 0 ? ___SMMUL(diff << 4, param_1 << 4) : 0;
Phase2 -= diff < 0 ? ___SMMUL(diff << 4, param_2 << 4) : 0;
int32_t r;

SINE2TINTERP(Phase1, r)
outlet_1 = r >> 5;
SINE2TINTERP(Phase2, r)
outlet_2 = (r >> 5);
prev = in;

Privacy

© 2024 Zrna Research