I’ve been building myself a simple sequencer. Instruments have a List containing their osc messages for every beat, and the sequencer is a TempoClock which calls a function : send the current bundle containing every osc message for the current beat, fetch the next bundle, then return 1 to keep looping.
However, I also have continuous synths, i.e. drones, that I’d like to also make vary in time. I’ve been thinking about this for quite some time, and I can’t really figure out what’s the best way to do so. For example, I’d like the frequency of the drone to slide from 440 to 880 between beat 5 and 9.
Maybe I’m wrong, but I suppose the TempoClock’s function is the trigger.
I think the best ‘musical’ solution would be to trigger a control bus at beat 5, that will play a Line.kr with the correct time so that it approximately ends at beat 9 (I’m definitely not looking for sample perfect accuracy here). But if I change the TempoClock’s tempo at beat 7, this won’t upate Line’s time setting, thus desynchronising. I suppose I could implement a function that retriggers a control bus every time I change the tempo, but that seems overcomplicated ?
Another solution would be to call a Routine, that changes the parameter so quickly that it appears linear. It would be triggered at beat 5, and would divide the target time in tiny increments, mapping the parameter change. Since it would be tied to the TempoClock, I suppose it would be keeping in sync (not perfectly but fine enough) if I change its tempo ?
I suppose some of you have been dealing with this for a long time, so if anyone has any solution or insight to share about this, this would help me a lot. Thank you.