lerxstrulz
Well-known member
Hi All,
Just started experimenting with the chorus effect and flanger effects, and the docs say the only modification you can make to the chorus is the number of voices once you have called begin. On the flanger, you can change offset, depth and freq after calling begin.
I have noticed a difference in sounds if you call begin with different size sample arrays (makes sense lol) and was wondering if it was possible to dynamically change the delay length and buffer as well, but not sure if this is possible without causing memory leaks?
Can I just declare a longer buffer array and then change the delay time as long as it's shorter than the original length? Does it need to match?
For example:
So I have a max of (16*128), but if I say, call begin again to change the delayline with a smaller length:
would this cause an issue?
Wanting to give the user a way to change the sample length if at all possible without causing memory leaks or crashing the app.
Thank you!
Just started experimenting with the chorus effect and flanger effects, and the docs say the only modification you can make to the chorus is the number of voices once you have called begin. On the flanger, you can change offset, depth and freq after calling begin.
I have noticed a difference in sounds if you call begin with different size sample arrays (makes sense lol) and was wondering if it was possible to dynamically change the delay length and buffer as well, but not sure if this is possible without causing memory leaks?
Can I just declare a longer buffer array and then change the delay time as long as it's shorter than the original length? Does it need to match?
For example:
Code:
#define CHORUS_DELAY_LENGTH (16*AUDIO_BLOCK_SAMPLES)
// Allocate the delay line
short delayline[CHORUS_DELAY_LENGTH];
So I have a max of (16*128), but if I say, call begin again to change the delayline with a smaller length:
Code:
chorus1.begin(delayline, 8 * AUDIO_BLOCK_SAMPLES, n_chorus)
would this cause an issue?
Wanting to give the user a way to change the sample length if at all possible without causing memory leaks or crashing the app.
Thank you!