Hi,
i'm wondering if theres a common way to use [expr] for crossfading two signals? i think that exponential crossfade is equal power right? or is it logarithmic? is there a formula floating around that is commonly used for this kind of thing?
Using [expr] for crossfading
Hi,
i'm wondering if theres a common way to use [expr] for crossfading two signals? i think that exponential crossfade is equal power right? or is it logarithmic? is there a formula floating around that is commonly used for this kind of thing?
i think equal power crossfade is actually meant to be a cos curve, but for most purposes an exponential one should suffice.
in that case:
[expr~ ($v1*(1-$v3*$v3)) + ($v2*($v3*$v3)]
will give you 3 inlets, the left and middle ones for your two signals, and then the right one for a signal between 0 and 1 for the crossfade amount (0 = left signal, 1 = middle signal)
note though, that equal power crossfades are generally for things like looping samples, where you want to mix between two fairly pure tones. If you're wanting to use crossfades like you would on a DJ mixer, then you're better off having both signals at 100% level when the crossfader is in the middle, in which case you'd use the same setup as above, but with:
[expr~ $v1*min(1, 2*(1-$v3))+$v2*min(1, 2*$v3)]
that's just for linear fades, which is usually good enough for DJ style crossfades in my opinion.
OK. thanks a lot!
expr~ $v1 + ($v3 * ($v2 - $v1))
1 and 2 are audio, 3 is fader sig~ numbers 0-1.
Most basic morphing algorithm that acts as a crossfader.
Oops! Looks like something went wrong!