frac32 frequency
bool32.rising reset phase
frac32.positive saw 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 >> 2;
}
outlet_wave = (Phase >> 5);
}