On Tue, Nov 30, 2010 at 9:25 AM, Olli Niemitalo <o...@iki.fi> wrote:
>
> I'll try to elucidate with two extreme examples. If the signal is
> white noise, then a linear cross-fade will make a dip in the volume,
> centered at the cross fade. This is because the phases of the two
> signals (one being faded in an one being faded out) don't match and
> there will be partial cancellation of components of the signal. On
> average the phase difference will be 90 deg. I recall my frustration
> using a sample editor which only offered linear cross-fade. It would
> often create this kind of a dip. The other example: If the signal is
> sinusoidal, then you can adjust the loop length to obtain a perfect
> match. In this case the linear cross fade will work perfectly: It does
> nothing, as the signals are already identical around the loop points.
>
> For uncorrelated signals you'd like to use something like this instead
> of a linear cross fade, to compensate for the dip:
>
> x = 0..1 is the time position inside the cross-fade
> f(x) is the gain function for the signal that is being faded in
> f(1-x) is the gain function for the signal that is being faded out
>
> These constraints should be satisfied:
>
> f(0) = 0
> f(1) = 1
> f(x)^2 + f(1-x)^2 = 1
>
> The last constraint above normalizes power or amplitude for the
> mixture of uncorrelated signals.
>
> Some functions that are applicable:
>
> f(x) = sqrt(x)
> f(x) = sin(pi/2*x)
> f(x) = x/sqrt(x^2+(1-x)^2)
>
> The last one is probably my favorite, as it has the same gain ratio
> f(x)/f(1-x) as a linear cross fade. It doesn't start the fade in as
> abruptly as the others.
>
> This is quite a similar problem as finding a nice pan law.
>

Thanks for your detailed explanation.  It is much clearer to me now.
Its seems like ideally the user would be able to adjust the cross fade
curve dynamically with the ability to observe the resulting amplitude
through the cross fade, before applying any destructive changes to the
sample data.  That certainly gives me some ideas to chew on.

> -olli
> --
> dupswapdrop -- the music-dsp mailing list and website:
> subscription info, FAQ, source code archive, list archive, book reviews, dsp 
> links
> http://music.columbia.edu/cmc/music-dsp
> http://music.columbia.edu/mailman/listinfo/music-dsp
>

Best regards,
Element Green
--
dupswapdrop -- the music-dsp mailing list and website:
subscription info, FAQ, source code archive, list archive, book reviews, dsp 
links
http://music.columbia.edu/cmc/music-dsp
http://music.columbia.edu/mailman/listinfo/music-dsp

Reply via email to