int32 samples in
bool32.rising reset phase
frac32buffer wave
uint32_t Phase;
uint64_t freq;
uint32_t r;
Phase = 0;
r = 1;
if (inlet_smps) {
freq = (int)(281474976710656.f / (inlet_smps * (128 << 3)));
} else
freq = 0;
{
if (inlet_reset && r) {
Phase = 0;
r = 0;
} else {
if (!inlet_reset)
r = 1;
Phase += freq >> 6;
}
outlet_wave = (Phase >> 5);
}