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

Florian Paul Schmidt mista.tapas at gmx.net
Fri Nov 18 14:10:04 CET 2022


Hi Fons,

On 11/16/2022 2:14 PM, Fons Adriaensen wrote:
> On Wed, Nov 16, 2022 at 12:51:44PM +0100, Florian Paul Schmidt wrote:

> 1. If I understand this correctly the L and R outputs have opposite phase
>     shifts. That means they will not sum to the input. Just assume the L
>     shift is 90 degrees. then R is -90, and they will just cancel.

If I limit the phases to the interval (-pi, pi) then for each fft bin
(with phases theta and -theta respectively for the L and R channels),
then summing the filtered L and R signals results in a gain of
2*cos(theta) in that respective frequency bin - the extremum being the
mentioned cancellation, i.e. gain 0, when the phases are -pi/2 and pi/2
respectively.

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.

The price for this is that in the "spread" channels the amplitude is not
1 for all fft bins, i.e. there is (additional) amplitude ripple. This
ripple is larger for bigger relative phase shifts (and approaching
infinity for pi, i.e. -pi/2 in one channel and pi/2 in the other). I
found in listening tests that limiting the relative phase shift to pi/2
gives acceptable results, even if the ripple approaches 40%.

It is a subtle effect nonetheless, but it really comes to life when
splitting a guitar signal to stereo this way and then heavily distorting
both channels individually. This destroys the sum-to-original property
but the sum seems still pleasantly devoid of the typical haas-filtering
phase effects.

Kind regards,
FPS

P.S.: I updated the code in the repository with these changes if someone
wants to test it out..


--
https://dfdx.eu


More information about the Linux-audio-dev mailing list