[LAD] Phase rotation

Robin Gareus robin at gareus.org
Sun Aug 29 22:03:20 CEST 2021


Hi all,

During the last days, I looked into phase-ration: components of a signal
are delayed differently depending on their frequency.

A good write up on the subject can be found at [1], and a commercial
tool is available from [2].

The interesting aspect is that phase rotation does not alter the sound
of the signal nor the loudness. However changing the phase vs. frequency
relationship between lower and upper harmonics changes the waveform and
can affect where the digital peak occurs.

For this reason phase rotation is commonly used by radio stations to
reduce the signal peak, and make the signal more symmetrical. Phase
rotation circuits are also used during mastering to increase headroom.

To implementing this, the following operations are performed:

* FFT
* rotate phase, retain magnitude
* inverse FFT

This works well, except for the first FFT bin: 0 Hz, DC offset. If the
phase-shift changes the average DC level of the signal there is a
discontinuity.

I could use some of the collective expertise of this list.

Has anyone looked into this before?

Is it even possible with piecewise block processing?

Is there a way to calculate the DC offset?

Since the overall magnitude does not change simply summing up the bins
results in the same 0th bin. I considered to low-pass filter the DC
offset, or simply remove the DC offset using a high-pass before the FFT
to mitigate the issue. But either introduces different artifacts. If I
understand correctly, a Hilbert transform as mentioned at [1] has the
same issue.

I've condensed the DSP into a simple test tool to toy around with the
issue: https://gist.github.com/17fd61b04d4c4939727dfdccd79f53a5

with low frequencies, the differences are obvious:

* https://i2.paste.pics/cc32f6c5d622e31ab0e830ab1ce205e9.png (2.5 *
FFT's base-freq)
* https://i2.paste.pics/3e6eb827148b90800569843c11da2e48.png (0.37 *
FFT's base-freq)


I'd appreciate any insights.

--
robin


[1]
https://forum.juce.com/t/how-to-rotate-the-phase-of-an-audio-signal/39072/10

[2] https://www.izotope.com/en/products/rx/features/phase.html

-------------- 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/20210829/f37f370b/attachment.sig>


More information about the Linux-audio-dev mailing list