frac32 frequency
bool32.rising reset phase
int32 divider
frac32buffer wave
uint32_t Phase;
uint32_t r;
Phase = 0;
r = 1;
{
if (inlet_reset && r) {
Phase = 0;
r = 0;
} else {
if (!inlet_reset)
r = 1;
Phase += ((inlet_freq >> 6) << inlet_divider);
}
outlet_wave = (Phase >> 5);
}