chaosGuide

chaotic oscillator, useful for percussion sounds and waveguide sounds with a noisy "pluck" part for as long as the gate is high. X, Y, and Z are the initial "pluck" values when either gate or sync goes high. Connect an oscillator to the sync input for syncing the waveguide and using it as a timbre-controlled oscillator. Depending on the values of the controls, the timbre can be totally different. Control the gate's length to provide different "pluck" times. As the sync will be off as long as the gate is high, the oscillator will be in it's chaotic state. This state can either be repeating, noise or decay quickly with random quirks.. everything is possible.
Author: Remco van der most
License: BSD
Github: sss/osc/chaosGuide.axo

Inlets

frac32 x

frac32 y

frac32 z

frac32 b

frac32 r

frac32 s

frac32 time

frac32 LP

frac32 HP

frac32buffer sync

bool32 gate

Outlets

frac32buffer x

Parameters

frac32.s.map b

frac32.s.map r

frac32.s.map s

frac32.s.map time

frac32.s.map x

frac32.s.map y

frac32.s.map z

frac32.s.map.pitch LP

frac32.s.map.pitch HP

Declaration
int32_t x;
int32_t y;
int32_t z;
float32_t s;
float32_t r;
float32_t b;

int32_t F;
int32_t G;
int32_t X;
int32_t Y;
int32_t Z;

int gtrig;
Control Rate
int32_t freq;
MTOF(param_HP + inlet_HP, freq)
int32_t fraq;
MTOF(param_LP + inlet_LP, fraq)

float32_t t = param_time + inlet_time;
b = param_b + inlet_b;
r = param_r + inlet_r;
s = param_s + inlet_s;

b = ((float32_t)(b) / (float32_t)(1 << 24));
r = ((float32_t)(r) / (float32_t)(1 << 19));
s = ((float32_t)(s) / (float32_t)(1 << 19));
t = ((float32_t)(t) / (float32_t)(1 << 31));
Audio Rate
if (((inlet_sync + (inlet_gate > 0 ? (1 << 27) : -(0 << 26))) > 0) && !gtrig) {
  gtrig = 1;
  x = param_x + inlet_x;
  y = param_y + inlet_y;
  z = param_z + inlet_z;
} else if ((inlet_sync + (inlet_gate > 0 ? (1 << 27) : -(0 << 27))) <= 0) {
  gtrig = 0;
}

X = x;
Y = y;
Z = z;
x += ((int32_t)(s * (Y - X) * t));
y += ((int32_t)((X * (r - Z) - Y) * t));
z += ((int32_t)((X * Y - b * Z) * t));
SINE2TINTERP(x, X)
SINE2TINTERP(y, Y)
SINE2TINTERP(z, Z)
F = ___SMMLA((((X + Y + Z) >> 5) - F) << 1, freq, F);
G = ___SMMLA(((F - ((X + Y + Z) >> 5)) - G) << 1, fraq, G);
outlet_x = G;

Privacy

© 2024 Zrna Research