[LAD] Phase rotation

Robin Gareus robin at gareus.org
Tue Aug 31 04:24:43 CEST 2021

Hi Fons,

Thanks for the reply, and from vacation no less.

On 8/30/21 7:06 PM, Fons Adriaensen wrote:

> To implement this you need more than just FFT and IFFT. Using only
> those on each block would amount to circular convolution, while
> what you need is linear convolution. Changing only the phase of
> a signal is just a special case of filtering, which means the output
> will be longer than the input.

Aha! That is what I was missing and didn't understand. Thank you.

> Define the phase shift in the
> frequency domain (i.e. as if it were the result of an FFT), do the
> inverse FFT and use the result as the IR for the convolver.

So just compute a FIR and apply it. I now have a working prototype.

I hoped to sidestep that because the phase-angle should be a sweepable
parameter. I can probably make this work by cross-fading the computed
FIR when the parameter changes.

> Now don't believe that phase shifting a signal will always result
> in a waveform with a lower peak/RMS ratio. It could very well
> have the opposite effect.

Well, there is a minimum. So far I just brute force detect it, trying
all angles in 1 deg steps on a file.

Finding out if it can be computed is up next. Perhaps using linear
regression on the spectrum of the file. I may pick your brain again when
I progress to that stage.
> Greetings to all from sunny Crete.

The next retsina is on me, unless you prefer a cold ΑΛΦΑ beer :)

Stay safe!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <https://lists.linuxaudio.org/archives/linux-audio-dev/attachments/20210831/7f416049/attachment.sig>

More information about the Linux-audio-dev mailing list