A while ago, I wrote a library of useful functions. One of them is an lfo function, and another is an envelope function. Both can be used with effects.
There’s lots of other cool stuff in there too. Check it out.
lfo and env are the most immediately useful to you. There should be example code in the docs on github.
Have fun!
I have an update to this library coming soon. I’m busy moving and retiring, but once I have some time I should get the new version out. Has tons of cool new features – playing multisamples with articulations, velocity and round robins; granular synth/effect; step effects a la Infiltrator; whistle and slidewhistle pseudo-synths; looping arpeggiator a la Harmony Bloom; and much more.
Looking forward to getting it out the door. It’s been in testing and debugging for a while, but I’ve been busy with other things.
I tried out your PR and it does work, but it is not fullproof. you MUST ensure that you press STOP before running your program (eg the example in the PR above). You could for example still have a program running in a different buffer, perhaps awaiting a cue which has not finished. In that case, the run count will not be reset when you run the program you are trying to control. The run_count value is cumulative on all progtram buffers until STOP is pushed. The best check is to make sure that the log shows