Using linear ramps going synchronously from 1 to 0 and 0 to 1 as amplitude factors for each respective source should work fine. Multiply your inputs by these signal ramp values and add the results while crossfading.
That's it !
To ensure constant volume (e.g. if when cross-fading between two similar sources, you don't want to hear the tinyest volume change), you should apply a transfer function to your amplitude ramps so that they look more "logarithmic". But linear ramps are already good for short fades like 50ms and lower, because your ear doesn't really have time to notice the amplitude "hole".

I'm sure someone knows the exact equation here for constant volume ...


Le 16/06/18 à 20:01, Benny Alexandar a écrit :
Please share the link of cross fade.

*From:* <> on behalf of Matt Ingalls <>
*Sent:* Saturday, June 16, 2018 11:27 PM
*Subject:* Re: [music-dsp] Blend two audio
A short (~50ms) cross-fade should be fine.

I may be reading too much into your question, but if
t is continually changing (user is adjusting a delay tap, for example),
a nice trick I’ve done is to cache the new t value until the crossfade finishes, Then start a new crossfade, etc..  this prevents clicking and pitch changing artifacts

On Jun 16, 2018, at 10:45 AM, Benny Alexandar < <>> wrote:


I'm looking for an algorithm to blend two audio.  My requirement is
given tow identical audio inputs say A1 & A2.
A1 is ahead of A2 by t sec, when switch from A1 to A2
it should be seamless and vice versa.


dupswapdrop: music-dsp mailing list <>

dupswapdrop: music-dsp mailing list

dupswapdrop: music-dsp mailing list

Reply via email to