Equal Power Crossfade

Discuss Lemur and share techniques.
Post Reply
vanceg
Newbie
Posts:24
Joined:11 Dec 2011 03:36
Equal Power Crossfade

Post by vanceg » 29 Jun 2012 20:49

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?

iamdamien
Newbie
Posts:10
Joined:27 Mar 2012 02:30

Re: Equal Power Crossfade

Post by iamdamien » 29 Jun 2012 23:31

Edit: Attachment Removed.

Reason: My example was linear, not constant!

-Damien
Last edited by iamdamien on 30 Jun 2012 04:11, edited 1 time in total.

Macciza
Regular
Posts:1325
Joined:07 Dec 2011 04:57
Location:Sydney, Australia.

Re: Equal Power Crossfade

Post by Macciza » 30 Jun 2012 02:19

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.4KiB)Downloaded 173 times
You would need to interface this to your MIDI as required.

Hope that helps
MM
iMac 2.8G i7 12G 10.6.8/10.7.2, Legacy Dexter/Lemur, Liine Lemur/iPad2, KMI SoftStep, 12Step & QuNeo , B-Controls, Mackie C4 etc
MaxMSP, Live Suite, Native Instrument stuff, etc Modified Virtual Guitar System etc All Projects/Modules © CC-BY-NC-SA[*][/b]

vanceg
Newbie
Posts:24
Joined:11 Dec 2011 03:36

Re: Equal Power Crossfade

Post by vanceg » 01 Jul 2012 05:39

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

Post Reply