Page 1 of 1

Equal Power Crossfade

Posted: 29 Jun 2012 20:49
by vanceg
Does anyone have a handy formula for an equal power crossfade curve?

What I'm trying to do is set up a fader that has a single MID output. I want to then send the MIDI from that fader to two audio faders, inverting one of the MIDI signals (so one is 0-127 and the other is 127-0) and achieve an equal power crossfade between the two audio channels.

I keep plugging formulas like "round((Fader.x^0.5)*126+1)" into the Value field of custom MIDI objects...but that just isn't working - I get a "hole" in the middle when I fade between the two audio channels. I am sure I'm just not using the right formula yet. What's the RIGHT formula?

Re: Equal Power Crossfade

Posted: 29 Jun 2012 23:31
by iamdamien
Edit: Attachment Removed.

Reason: My example was linear, not constant!

-Damien

Re: Equal Power Crossfade

Posted: 30 Jun 2012 02:19
by Macciza
Hi Vance
Starting from something like this as a standard equal-power crossfade formula
// starting with pan range of -1 to +1,
float angle = (panRange+1)*(0.25*PI); // range 0 to PI/2.
float leftAmplitude = cos(angle);
float rightAmplitude = sin(angle);

You might end up with something like this
EqPowXFade.jzlib
(4.4 KiB) Downloaded 162 times
You would need to interface this to your MIDI as required.

Hope that helps
MM

Re: Equal Power Crossfade

Posted: 01 Jul 2012 05:39
by vanceg
Thank you.

Indeed - I know this formula but was having a heck of a time figuring out how to implement it. And went for one I DID seem to know how to do.

I will try to run this with the Y value of a Multiball taking the place of the Multislider.....because what I'm REALLY trying to accomplish is create a simple surround panning system for the weird way in which I use Live.

Vance