Hi
I'm trying to achieve some "natural sounding" cross fading between 2 speakers, with the aim of keeping the volume constant during the fading.
For example:
In the loop:
Now the problem is that the fading seems to be using a linear mapping which makes the dynamic change a lot, when I'd like to keep the volume at the same level.
Would there be an easy way to edit the fader code to change this, like using sine or log function for the mapping?
I've tried another way, with mixers and adjusting the gain over time using a sine function instead of linear, which is fine when the cross time is high, as the volume is pretty constant then, but under a certain amount (e.g 250ms) there is a lot of audio clicking (and I'd like to do some very fast cross fading under 100ms).
(On another note I've noticed that the fader object stops working when the duration is below 55ms).
Thanks for your suggestions!
Ben
I'm trying to achieve some "natural sounding" cross fading between 2 speakers, with the aim of keeping the volume constant during the fading.
For example:
In the loop:
Code:
AudioNoInterrupts();
fader1.fadeIn(500);
fader2.fadeOut(500);
AudioInterrupts();
delay(500);
AudioNoInterrupts();
fader2.fadeIn(500);
fader1.fadeOut(500);
AudioInterrupts();
delay(500);
Now the problem is that the fading seems to be using a linear mapping which makes the dynamic change a lot, when I'd like to keep the volume at the same level.
Would there be an easy way to edit the fader code to change this, like using sine or log function for the mapping?
I've tried another way, with mixers and adjusting the gain over time using a sine function instead of linear, which is fine when the cross time is high, as the volume is pretty constant then, but under a certain amount (e.g 250ms) there is a lot of audio clicking (and I'd like to do some very fast cross fading under 100ms).
(On another note I've noticed that the fader object stops working when the duration is below 55ms).
Thanks for your suggestions!
Ben