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 ...

Joseph

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

-ben
------------------------------------------------------------------------
*From:* music-dsp-boun...@music.columbia.edu <music-dsp-boun...@music.columbia.edu> on behalf of Matt Ingalls <m...@8dio.com>
*Sent:* Saturday, June 16, 2018 11:27 PM
*To:* music-dsp@music.columbia.edu
*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
-m

On Jun 16, 2018, at 10:45 AM, Benny Alexandar <ben.a...@outlook.com <mailto:ben.a...@outlook.com>> wrote:

Hi,

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.

-ben

_______________________________________________
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu <mailto:music-dsp@music.columbia.edu>
https://lists.columbia.edu/mailman/listinfo/music-dsp



_______________________________________________
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp

_______________________________________________
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp

Reply via email to