Welcome to %s forums

BrainModular Users Forum

Login Register

FFT questions

General Discussion about whatever fits..
Post Reply
Ken29
Member
Posts: 116
Contact:

Unread post by Ken29 » 05 Apr 2011, 12:17

Hi guys,

I have several questions about the FFT in Usine.

Is there any window used before for the conversion (rectangular, Hanning...)

And most of all, I don't understand why there is a Imaginary part after the conversion ?

I thought, in a 1024 line FFT, 513 where kept as shown below. But in that case there's just an amplitude for each lines and no imaginary part ?

Image

Thanks for your help

Kenan

caco
Member
Posts: 306
Contact:

Unread post by caco » 05 Apr 2011, 14:56

If I remember correctly the Usine FFT module uses a Hann window.

I am not a French speaker so I do not understand the image you posted. However, it is correct that a FFT splits a signal into complex numbers each consisting of a pair of real and imaginary numbers. Normally for a FFT on a block of 1024 audio samples you would therefore expect a FFT routine to return 512 values for real and 512 for imaginary numbers, e.g half your original block size for each. These can then be converted into actual phase/amplitude data or later converted back into an audio signal via iFFT.

multiphone
Member
Posts: 303
Contact:

Unread post by multiphone » 05 Apr 2011, 15:38

Hello,

Yes Caco , The FFT gives in frequency domain a result of complex numbers of form:

n = x + j * i

One for the real part (x) and the other the imaginary (j * i).

If you want only the amplitudes you can use the module "Cart2Pol" (real / imaginary -> magnitude / phase).
HB

Lines / Points / Squares

http://www.hervebirolini.com/

Ken29
Member
Posts: 116
Contact:

Unread post by Ken29 » 05 Apr 2011, 16:07

Hi guys,

according to the schema above, is the real part for 0 to f and the imaginary part for -f to 0 ?

Kenan

multiphone
Member
Posts: 303
Contact:

Unread post by multiphone » 05 Apr 2011, 17:12

Hello Kenan,

The representation of a spectrum is by convention with positive frequencies, but by calculation it consists of the same frequencies in the negative domain. It is symmetrical. That is something that is related to the "sampling rate theorem" . If the sampling frequency is 44100 Hz, so the signal spectrum is theoretically - 22050 Hz to 22050 Hz.

Best
HB

Lines / Points / Squares

http://www.hervebirolini.com/

Ken29
Member
Posts: 116
Contact:

Unread post by Ken29 » 06 Apr 2011, 00:35

Ok,

But I still don't understand why there's an Imaginary part ( or Phase)> On the schema above which is the result of a FFT, there is just the frequencies on the first axis and the amplitude on the second. What does the phase represent ?

Kenan

caco
Member
Posts: 306
Contact:

Unread post by caco » 06 Apr 2011, 08:48

Fourier's theorem states that any waveform in the time domain can be represented by the weighted sum of sines and cosines. The difference between a sine and a cosine is purely phase shift. So perhaps you can consider the amplitude to be the strength of each frequency bin and the phase to be its relative position, e.g sine or cosine or somewhere inbetween.

Ken29
Member
Posts: 116
Contact:

Unread post by Ken29 » 06 Apr 2011, 12:11

Thanks,

It's a bit more clear.

I also found this in French, it is very interesting.

http://www.unilim.fr/pages_perso/jean.d ... er/fft.htm

If I understood correctly, It says in the particular case of an audio signal, The Real Part and Imaginary are redundant, in that case, you can use only the real part.
In that case, after a conversion to (magn/phase), shouldn't the phase be a constant ?

Sorry for all this questions but school and math are far far away now. But I feel there's a lot of good sound torturing to do with the FFT.

Thanks

Kenan

capitan mission
Member
Posts: 41
Location: Bariloche, Patagonia Argentina
Contact:

Unread post by capitan mission » 06 Apr 2011, 19:41

caco wrote:Fourier's theorem states that any waveform in the time domain can be represented by the weighted sum of sines and cosines. The difference between a sine and a cosine is purely phase shift. So perhaps you can consider the amplitude to be the strength of each frequency bin and the phase to be its relative position, e.g sine or cosine or somewhere inbetween.
Exactly.

"Nyquist Theorem

The number 44100 was chosen for a good reason. As previously mentioned, humans can hear up to 20000 Hertz at most. In 1928, US physicist Harry Nyquist (1889-1976) proposed a theory stating that a frequency of at least twice the signal frequency was necessary to accurately represent a sound signal digitally ("Nyquist-Shannon sampling theorem"). Concretely, this means that one needs the maximum and minimum values for each period to accurately represent a waveform's basic shape, i.e., two points per period
For a wave with 20000 Hz, which equals 20000 periods per second, we need at least 40000 points per second to accurately represent it. To ensure that the entire spectrum of sounds audible to humans was included, a sample rate of 44100 was chosen for audio CDs. This means that waves of up to 22050 Hz could be captured"

I asume that sine a cosine are the maximum and minimum values of each period.

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 25 guests