Hi Ilya!ilyaorlov wrote: Wed Jul 22, 2020 2:13 pm Hey, Eric!
I'd say you probably just process each sample by your compressor function first, then by delay function, they by filter, etc. Just like if you had multiple plugins, they'd work one after another. You definitely use processSample (or processBlock) just once in your code and do your processing inside it.ericbridenbaker wrote: Mon Jul 20, 2020 7:06 pm What I'd like to try next is to chain a few different effects in the same code. Example, compressor into a delay, or a filter into a clipper etc. So I'm trying to get a handle on how to route the serial processing. If I'm using processSample, and ioSample, do I need to define intermediate audio streams for each effect? And would I need to use void processSample more than once in the same code?
Thanks very much. Success!
One thing I've noticed in the example codes would be to assign a variable for the current sample and use that for each process.
Example:
At the beginning of the processing loop.
sample=ioSample[channel];
Then "sample" is used in place of ioSample throughout until the end of the processing loop.
And the value is returned back at the end of the loop using
ioSample[channel]=sample;
Understanding how this works made things a lot easier for me. But I also noticed that the code will still work without doing this. My guess is that there must be a CPU advantage to not using ioSample[channel] all the time. Will investigate.
Thanks again!