Hello all,
ATM, in Pd, I am struggling with creating a externally synched LFO receiving a clock from an external source. For instance a sawtooth (phasor~) .
For this LFO to complete its cycle, I need to calculate its frequency, therefore I think I need to know the time interval between 2 received ticks. The LFO also needs to start its cycle when receiving a tick( bang) from the emitter.
It also need to be quite steady : its frequency should not change at every tick.
But the emitter of the clock is of course is not perfect and the clock not completely steady. The time interval between 2 received ticks can change of a few ms.,
I tried averaging the value of the time interval with a running average but this is not satisfactory. The system does not respond well if too many points are taking into account.. leading to a desynch with the incoming clock and a slow respond to real change of the external clock (i.e. 120 -> 130 BPM).
I also wish not to change the average value of the frequency of the LFO every time a tick is received is received, but only when a significant change occurs.
Does any one have a solution for this ?
Thank you for your help.