[LAU] cross fade with equal power
willgodfrey at musically.me.uk
Sat Feb 15 00:19:33 CET 2020
On Fri, 14 Feb 2020 23:24:37 +0100
Atte <atte at youmail.dk> wrote:
>I've written a python script to do crossfades loops in samples. First version was using commandline tools, but updates of the underlying tools broke my script, so I re-did it with pydub, only to find that pydub seems to be doing linear fade when crossfading, resulting in a nasty drop in volume in the middle of the fade.
>So does anyone know of a commandline tool or even better python tool, that can cross fade with equal power or at least lets me do the fade ins/outs with the correct curve, then I can mix them myself afterwards.
>Thanks in advance for any pointers.
>NB: I'm not sure my mails are comming through, since I don't see them myself. So even if you don't have a solution to my problem, a friendly "mail went through" would be highly appreciated.
This is what I use for near constant power panning. Any good?
float t = (float)(GlobalPar.PPanning - 1) / 126.0f;
pangainL = cosf(t * Pi/2);
pangainR = cosf((1.0f - t) * Pi/2);
Where GlobalPar.PPanning is in the range 0 - 127
It actually gives a 3dB hump in the middle.
Will J Godfrey
Say you have a poem and I have a tune.
Exchange them and we can both have a poem, a tune, and a song.
More information about the Linux-audio-user