Hello Everyone!
I’ve been working on a patch in PlugData that uses an external trigger to control the speed of an LFO. So far, I’ve experimented with several “tap tempo” setups, but none have produced consistent results. The patch below is the best version I’ve created so far—it works to some extent, but it’s not stable.
Do you have any suggestions for improving this, or perhaps an entirely different approach?
Thanks for taking the time to check it out!
Few things:
[timer]
outputs miliseconds
[osc~]
expects a frequency in hz (1/seconds)
- you can also use
[hv.lfo]
abstraction that takes care of the [snapshot~]
and such
I will come back to try a patch that does this myself later.
Why not simply do this?
We time between triggers, convert that to seconds, then to 1/seconds (hz) and give that to [hv.lfo sine]
(there are other waveforms as well).
I’m not sure why you are doing the modulus and select, if you want to compare every input trigger than just connect it straight to timer.
What is your intention with knob here, you want to combine the frequency of the timer with the knob?
I just tested this patch on a Patch.Init() and it works for me 
That definitely works!
As for the knob, I’m aiming to control the speed with it OR external clock. Right now, it only kind of works. The knob functions as expected when used alone, and the timer solution you suggested works too. However, when a gate signal is present, the two signals interfere with each other. I’ll need to figure out a way to resolve that.
Thanks so much for your help with the syncing issue, and for all the other tips!