I was wondering if there is a good way to reset all of the OSCs at one time? I will have up to 12 tracks and each track will have at least 2 OSCs or a minimum of 24 oscillators (likely more as I go forward). Would it be best to stop the audio engine, reset all of the OSCs, and restart the audio engine?
Any thoughts or help here would be appreciated.
Define “reset”. The only state-related thing in DaisySP oscillators (more or less) is a phase. You’ll probably not notice a difference between starting the osc from 0 vs from the random phase. Everything else is implementation dependant.
Well I guess this is what I was wondering:
What would be the best way to ensure that a set of oscillators that are 1) the same frequency and 2) set to the same phase all get rest to phase zero to all start playing together again in phase? Would I need to do this inside of the audio callback so that they all stay in sync / in phase?
Would I need to do this inside of the audio callback so that they all stay in sync / in phase?
I guess so since only audio callback can guarantee non-interrupted execution AFAIK. But, why do you need to reset the phases? IMO it’s quite redundant and will kinda make everything super complicated in the polyphony setup.
Good question: I decided to create a square wave OSC with a duty cycle. From there I am using that as my pulse train to send gate signals out a DAC. I will want ot reset these gates when a reset signal comes in. Thus, I wanted to make sure they would all stay in sync.