Hello all,

I apologize for being pedantic, but I believe that even the smallest 
misrepresentation can cause a lot of grief for a newcomer.


To that end, I'd like to point out that the phase chart does not correspond to 
the imaginary part (of the "logarithm" or anything else).

Fourier Transforms produce paired results in real and imaginary parts. These 
real & imaginary pairs are also known as the rectangular form. In order to 
obtain the magnitude and phase, the rectangular coordinates must be converted 
to a polar form. In the polar form, the "radius" corresponds to the magnitude 
and the "angle" corresponds to the phase.

It's true that some software API reuse the imaginary buffer to hold the phase 
values after a conversion from rectangular to polar coordinates, but my point 
is that the data is never both imaginary and phase. When the data represents 
imaginary values, there is no real world analog of what those values mean. 
However, when converted to polar form, the newly calculated values do 
correspond to the phase response for each frequency bin.


A secondary and much more minor point is that the magnitude is not necessarily 
a logarithm. The only guarantee is that the magnitude is the square root of the 
sum of the squares of the real and imaginary parts. The primary result in a 
linear amplitude, but we humans aren't generally able to make as much sense of 
linear amplitudes. Therefore, it's nearly universal that the magnitudes will be 
converted to a decibel scale, which is a logarithm by definition.


Apart from these corrections, Evan is correct - especially about the fact that 
mathematics has proven that the impulse response of a linear, time-invariant 
system like a filter corresponds precisely to the frequency response.


p.s. When converting from rectangular to polar coordinates, the magnitude is 
calculated using the root of two squares, as mentioned above, while the phase 
is calculated using trigonometric math to determine the angle based on the x 
and y vectors from the real and imaginary parts. Since trigonometric math is 
usually rather expensive in terms of CPU cycles, many FFT-based spectrum 
algorithms will only calculate the magnitude and not bother calculating the 
phase. For most applications, the phase is not necessary, so leaving it out 
makes the program run faster. In other words, it's too bad that the phase is 
not the imaginary part, because that would mean we didn't have to do any 
further calculations!

Brian Willoughby
Sound Consulting


On Feb 7, 2017, at 1:17 PM, Evan Balster <[email protected]> wrote:
> A filter's transfer function simultaneously describes its response to a 
> one-sample impulse and its response to any complex frequency in the z-domain. 
>  There's no need to compromise.
> The reason for this?  Applying a filter to a signal is the same as convolving 
> the signal by the filter's impulse response.  Convolution in the time domain, 
> as exemplified by filters, is identical to multiplication in the frequency 
> domain.  Thus we can look at any point in the transfer function (as evaluated 
> in the z-domain) and derive the effect the described filter will have on that 
> frequency.
> 
> To expand on that:  When we graph the filter response, the transfer function 
> is what's getting graphed.  A magnitude chart depicts the logarithm of the 
> transfer function's magnitude for e^(iw) where w is angular frequency; a 
> phase chart depicts the imaginary part of the logarithm.


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/coreaudio-api/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to