bool32 active
bool32.rising reset
frac32.bipolar axis x
frac32.bipolar axis y
frac32.bipolar axis z
frac32.u.map from oscillation to chaos
float x;
float tx;
float y;
float ty;
float z;
float tz;
float a;
float dt;
int res;
x = 0.1;
y = 0.1;
z = 0.1;
a = 0;
dt = 0.02;
res = 0;
if (inlet_active > 0) {
a = 0.2 + (param_val / 640000000.0);
tx = -y + (z * z);
ty = x + a * y;
tz = x - z;
x = x + tx * dt;
y = y + ty * dt;
z = z + tz * dt;
outlet_x = (int32_t)((0.5 + x) * (1 << 25));
outlet_y = (int32_t)((-0.5 + y) * (1 << 25));
outlet_z = (int32_t)((0.25 + z) * (1 << 25));
}
else {
outlet_x = 0;
outlet_y = 0;
outlet_z = 0;
}
if ((inlet_reset > 0) && !res) {
res = 1;
x = 0.1;
y = 0.1;
z = 0.1;
a = 0;
} else if (!(inlet_reset > 0))
res = 0;