[LAD] stereospread.lv2 - Stereo spreading plugin (conjugate random phase all-pass filter pair)

Fons Adriaensen fons at linuxaudio.org
Fri Nov 18 17:28:15 CET 2022


On Fri, Nov 18, 2022 at 02:10:04PM +0100, Florian Paul Schmidt wrote:

> This gain can be cancelled by scaling the magnitude of the fft bin by
> 1/(2*cos(theta)). This then ensures summing to the original signal.

You'd need quite a high (up to inifite) gain if the phase is near 90
degrees.
 
There is a much simpler solution:

Create a filter, using an inverse FFT, that doesn't modify the phase
but just has some random gain between -1 and +1 in each frequency bin.
Let F be that filter. It will be symmetric in the time domain, so have
a delay equal to half its lenght. Let D be that delay.

With X your input signal, compute

X1 = D (X)        # X delayed
Y = G * F (X)     # X filtered and delayed, gain G

L = 0.5 * (X1 + Y)
R = 0.5 * (X1 - Y)

where user paramter G controls the amount of effect.

Summing L and R will always give X1, the delayed input.

-- 
FA





More information about the Linux-audio-dev mailing list