Hi List,
I need a simple equal-power crossfade between two signals. I asked the same question a few years ago, but i just can't remember how to do it...
Cheers!
Pierre.
Hi,
On Mon, Feb 06, 2012 at 02:22:34PM +0100, Pierre Massat wrote:
I need a simple equal-power crossfade between two signals. I asked the same question a few years ago, but i just can't remember how to do it...
This is used in rj's e_pan.pd:
left = cos(p) * signal right = sin(p) * signal
where p is in radians from 0 to PI/2 (i.e. multiply your 0...1 panning by 1.5708...)
Frank Barknecht Do You RjDj.me? _ ______footils.org__
Thanks Frank!
Pierre
2012/2/6 Frank Barknecht fbar@footils.org
Hi,
On Mon, Feb 06, 2012 at 02:22:34PM +0100, Pierre Massat wrote:
I need a simple equal-power crossfade between two signals. I asked the
same
question a few years ago, but i just can't remember how to do it...
This is used in rj's e_pan.pd:
left = cos(p) * signal right = sin(p) * signal
where p is in radians from 0 to PI/2 (i.e. multiply your 0...1 panning by 1.5708...)
Ciao
Frank Barknecht Do You RjDj.me? _ ______footils.org__
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Here's an argument for plain linear crossfade. I get power "boosts" with cosine crossfades...
best,
J
On Mon, Feb 6, 2012 at 8:53 AM, Pierre Massat pimassat@gmail.com wrote:
Thanks Frank!
Pierre
2012/2/6 Frank Barknecht fbar@footils.org
Hi,
On Mon, Feb 06, 2012 at 02:22:34PM +0100, Pierre Massat wrote:
I need a simple equal-power crossfade between two signals. I asked the same question a few years ago, but i just can't remember how to do it...
This is used in rj's e_pan.pd:
left = cos(p) * signal right = sin(p) * signal
where p is in radians from 0 to PI/2 (i.e. multiply your 0...1 panning by 1.5708...)
Ciao
Frank Barknecht Do You RjDj.me? _ ______footils.org__
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
There are some pan algorithms in the 'pan' library also, included in Pd-extended. They're all pd abstractions.
.hc
On Feb 6, 2012, at 9:29 AM, Jaime Oliver wrote:
Here's an argument for plain linear crossfade. I get power "boosts" with cosine crossfades...
best,
J
On Mon, Feb 6, 2012 at 8:53 AM, Pierre Massat pimassat@gmail.com wrote:
Thanks Frank!
Pierre
2012/2/6 Frank Barknecht fbar@footils.org
Hi,
On Mon, Feb 06, 2012 at 02:22:34PM +0100, Pierre Massat wrote:
I need a simple equal-power crossfade between two signals. I asked the same question a few years ago, but i just can't remember how to do it...
This is used in rj's e_pan.pd:
left = cos(p) * signal right = sin(p) * signal
where p is in radians from 0 to PI/2 (i.e. multiply your 0...1 panning by 1.5708...)
Ciao
Frank Barknecht Do You RjDj.me? _ ______footils.org__
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
-- Jaime E Oliver LR
jo2357@columbia.edu www.jaimeoliver.pe 858 750 0924 (cel) <linear-cross.pd>_______________________________________________ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
'You people have such restrictive dress for women,’ she said, hobbling away in three inch heels and panty hose to finish out another pink-collar temp pool day. - “Hijab Scene #2", by Mohja Kahf
Make sure to use the interval 0 -> Pi/2, panning beyond will only crossfade back and forth
On 6 February 2012 15:29, Jaime Oliver jaime.oliver2@gmail.com wrote:
Here's an argument for plain linear crossfade. I get power "boosts" with cosine crossfades...
best,
J
On Mon, Feb 6, 2012 at 8:53 AM, Pierre Massat pimassat@gmail.com wrote:
Thanks Frank!
Pierre
2012/2/6 Frank Barknecht fbar@footils.org
Hi,
On Mon, Feb 06, 2012 at 02:22:34PM +0100, Pierre Massat wrote:
I need a simple equal-power crossfade between two signals. I asked the same question a few years ago, but i just can't remember how to do it...
This is used in rj's e_pan.pd:
left = cos(p) * signal right = sin(p) * signal
where p is in radians from 0 to PI/2 (i.e. multiply your 0...1 panning by 1.5708...)
Ciao
Frank Barknecht Do You RjDj.me? _ ______footils.org__
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
-- Jaime E Oliver LR
jo2357@columbia.edu www.jaimeoliver.pe 858 750 0924 (cel)
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
On Mon, Feb 06, 2012 at 09:29:33AM -0500, Jaime Oliver wrote:
Here's an argument for plain linear crossfade. I get power "boosts" with cosine crossfades...
Your example is a bit broken (there is no panning going on at all), but I get the same result with a the fixed version or with [e_pan] in the rj library when adding left and right signal together and taking the RMS.
The "boost in the center" is to be expected: In the center with CP-panning, left and right channels both are multiplied by about 0.707 instead of 0.5 with a linear pan, so adding them together will make the center louder. Perception-wise this results in the signal appearing nearer to you than with linear panning, which is the reason this is used: With CP-panning the signal will appear to move around you in a constant circle whereas with linear panning it will move farther away from you as it gets to the center, it will move as if on an oval.
Avoiding this kind of movement is the motivation for CP-panning.
Frank Barknecht Do You RjDj.me? _ ______footils.org__
On Mon, Feb 06, 2012 at 02:42:01PM +0100, Frank Barknecht wrote:
Hi,
On Mon, Feb 06, 2012 at 02:22:34PM +0100, Pierre Massat wrote:
I need a simple equal-power crossfade between two signals. I asked the same question a few years ago, but i just can't remember how to do it...
This is used in rj's e_pan.pd:
left = cos(p) * signal right = sin(p) * signal
where p is in radians from 0 to PI/2 (i.e. multiply your 0...1 panning by 1.5708...)
Oh, well, actually you were looking for crossfade, not panning. It's basically the same idea, though. In the rj library you could use [c_cpxfade]. The helpfile for this compares it with the linear [c_xfade] which has the "hole in the middle".
Frank Barknecht Do You RjDj.me? _ ______footils.org__
Le 2012-02-06 à 14:42:00, Frank Barknecht a écrit :
On Mon, Feb 06, 2012 at 02:22:34PM +0100, Pierre Massat wrote:
I need a simple equal-power crossfade between two signals. I asked the same question a few years ago, but i just can't remember how to do it...
This is used in rj's e_pan.pd:
left = cos(p) * signal right = sin(p) * signal
where p is in radians from 0 to PI/2 (i.e. multiply your 0...1 panning by 1.5708...)
That's for panning, not for crossfading.
crossfading is similar, but is the other way around :
signal = left * cos(p) + right * sin(p)
But if left=-right (opposite phase) then the crossfade will quickly fade out to silence and back in ;
and if left=right, then your power gain will be (cos(p)+sin(p))² = cos²(p)+2sin(p)cos(p)+sin²(p) = 1+2sin(p)cos(p) = 1+sin(2p). This goes up to double power (amplitude is multiplied by 1,414).
Generally speaking, as long as L and R don't have frequencies in common, this works perfectly, but as soon as they do, you have to do proper phase addition : the cosines are added separately from the sines : if you know a sinusoïd by its amplitude and phase offset, convert to cartesian before adding... this will show you how such things add up.
| Mathieu BOUCHARD ----- téléphone : +1.514.383.3801 ----- Montréal, QC