A metronome for the time signature pi over 4.

Actually produces two pulse trains, one of which fits 3.14159 beats into the the length of the other, and then resets.

It starts with a feedback integrator, which produces a rising signal. The purple wire carries a 0.01v signal up to the top corner which calculates a very small voltage 0.000045v. This is added repeatedly to itself in the integrator, which feedsback using the yellow wire.

The rising signal is reduced modulo pi (a constant fed through the pink wire, to form the bar sawtooth clock.

A further modulo reduction by 1 gives us the beat sawtooth clock.

Each clock is offset by a small negative voltage, and then a conditional operator produces a pulse while the clock is negative.

The Bar clock outputs through the green wire, and the beat clock through the red wire.

An improved version can be found at

https://patchstorage.com/pi-4-metronome-ii

This version will eventually stop. because the rising signal from the integrator will eventually become sufficiently large that the floating point maths will render the 0.000045v increment as insignificant.

I believe I can rearrange this to incorporate the modulo pi operation into the feedback loop, which would solve the problem, and still fit it all into the 12-algorithm device.