now after I got the basics working fine, I’d like to ask a few specific details about the PatchPlayer class. I am trying to embed SOUL into an existing polyphonic system and there are two things that would be helpful to know:
- What does the
reset()function do on the SOUL side? Is it setting all variables back to their initial state or is there more magic involved? And is it realtime safe to call this in the audio thread? I would call this method at every voice start to reset eg. the oscillator uptime or filter coefficients, then call
renderuntil the voice is stopped (from the outside).
- Can a PatchPlayer be cloned without having to be recompiled if neither the input files or the playback configuration has changed? A simple
PatchPlayer::clone()method would be enough. I’ve seen a
clone()method in one of the more low-level classes, so maybe it’s a trivial addition. I will use a SOUL patch inside a polyphonic system that requires each voice to have their own PatchPlayer and creating 256 sine oscillators takes 20 seconds, because each voice is compiled (compiling one voice takes 76ms on my computer).