int32 beat
int32 divider
frac32.bipolar rate
frac32 startpos
frac32 x
frac32 y
frac32 z
bool32.rising rst
frac32buffer out
table beat
uint32_t t;
uint64_t index;
int32_t inc;
uint32_t reset;
uint32_t divider;
uint64_t startpos;
uint32_t compute_output;
uint32_t beat_table;
inc = 0;
t = 0;
index = 0;
x = 0;
y = 0;
z = 0;
beat_table = 0;
x = inlet_x >> 19;
y = inlet_y >> 19;
z = inlet_z >> 19;
inc = inlet_rate >> 20;
if (inlet_rst && reset) {
index = inlet_startpos << 4;
reset = 0;
} else {
if (!inlet_rst)
reset = 1;
inc = inc << 1;
index += inc;
beat_table = attr_beat;
t = ((inlet_startpos << 4) + index) >> inlet_divider;
if (!beat_table) {
compute_output = (((Equation(inlet_beat, t, x, y, z, 1)) << 23) - (1 << 26))
<< 1;
} else {
compute_output =
(((Equation(inlet_beat, t, x, y, z, attr_beat)) << 23) - (1 << 26))
<< 1;
}
outlet_out = ___SMMUL(0x10000000, compute_output);
}