Talk:Fast Fourier transform: Difference between revisions

From Rosetta Code
Content added Content deleted
(Let's save Nyquist frequency issues for a future question?)
(Continued explanation of the need for better/more example data for the code to process)
Line 17: Line 17:


: The FFT is a sort of "self inverting transformation" (within limitations - your data needs to have a length which is a power of 2, for example). If you use it on the 1 1 1 1 0 0 0 0 result you should get back WAV data you started with (multiplied by a constant). There are a variety of directions you can take this. One thing you can do is make small changes to the FFT result before you transform it back, and then compare how the original sounds with how the result sounds. (You will probably want to cancel out the constant so the volumes are the same.) Basically, though, what you are seeing is the volumes of the different frequencies of the sounds. Higher frequence sounds sound "higher" or "sharper" while lower frequency sounds sound "lower". Try it and see? --[[User:Rdm|Rdm]] ([[User talk:Rdm|talk]]) 19:40, 13 December 2013 (UTC)
: The FFT is a sort of "self inverting transformation" (within limitations - your data needs to have a length which is a power of 2, for example). If you use it on the 1 1 1 1 0 0 0 0 result you should get back WAV data you started with (multiplied by a constant). There are a variety of directions you can take this. One thing you can do is make small changes to the FFT result before you transform it back, and then compare how the original sounds with how the result sounds. (You will probably want to cancel out the constant so the volumes are the same.) Basically, though, what you are seeing is the volumes of the different frequencies of the sounds. Higher frequence sounds sound "higher" or "sharper" while lower frequency sounds sound "lower". Try it and see? --[[User:Rdm|Rdm]] ([[User talk:Rdm|talk]]) 19:40, 13 December 2013 (UTC)

: Hi Rdm, Thanks for the reply. I think the problem is that there is nothing on the page to show the relationship between the 1,1,1,1,0,0,0,0 and the output numbers. I suppose this might be obvious to someone completely familiar with fourier transforms, but without a guide "key" I can't see it. Usually at least two examples are the minimum needed to show the working of a function (if the function mechanics are not terribly obvious). For me, it isn't so important to just be told "Put X into Y and you should get Z" (although that would be nice) but rather an explanation of why X into Y yeilds Z. - It's a similar problem with Wikipedia maths articles - they are all shorthand maths-professional to maths-professional articles and take a bit of figuring out. I don't mind figuring stuff out but need a bit more to go on (eg, more than one example data set). Eg, suppose I were to input 100ms of samples at a sampling rate of 22khz, mono, 16 bit - I would expect to see an array of frequencies output, but looking at the code, I can't immediately see what the resolution of that output array would be (how many elements), and how it knows that a window of 100ms worth of samples have been input.

This is the closest thing I have found so far to an easy-to-read code block, and I am very grateful to have found it here (I'm looking mostly at the C++ one, but having all the different languages here make it much easier to see the common elements of the code) but it isn't quite complete. A few more examples of input/output data would be a huge help to anybody reading this (any language)
Thanks again for writing-

Sam

Revision as of 17:46, 14 December 2013

Possible renaming

Would this be better named as "Fast Fourier Transformation", rather than just the initials? Markhobley 06:33, 11 July 2011 (UTC)

Or "Fast fourier transform"? --Paddy3118 07:38, 11 July 2011 (UTC)
Wikipedia uses “Fast Fourier transform”. This would fit with our capitalization policy (since “Fourier” is a surname). –Donal Fellows 07:52, 11 July 2011 (UTC)
When I google for fft my first hits are the relevant ones. I suspect it's good enough, though we should probably link FFT to one of those pages, just in case. --Rdm 08:10, 11 July 2011 (UTC)
Moved and linked. --Paddy3118 08:39, 11 July 2011 (UTC)

Explanation of input data please

Hi. A big problem with pages such as this (and I challenge you to try finding FFT information anywhere else on the internet which is simpler) is the lack of explanation of various parts of the explanantion. To explain: The code is nicely clear in the various langauges but no mention is given of what the input data is or what the output data is. I am looking for FFT information in the context of feeding in WAV data (audio) and getting out an array of frequencies for a particular time-frame (say 100ms). This 1,1,1,1,0,0,0,0 is meaningless without an explanation. Could somebody please fill in the blanks for the rest of us? Note to others: You can never put enough information in these articles. Assume everybody is in the dark about something... Thank you

-Sam
The FFT is a sort of "self inverting transformation" (within limitations - your data needs to have a length which is a power of 2, for example). If you use it on the 1 1 1 1 0 0 0 0 result you should get back WAV data you started with (multiplied by a constant). There are a variety of directions you can take this. One thing you can do is make small changes to the FFT result before you transform it back, and then compare how the original sounds with how the result sounds. (You will probably want to cancel out the constant so the volumes are the same.) Basically, though, what you are seeing is the volumes of the different frequencies of the sounds. Higher frequence sounds sound "higher" or "sharper" while lower frequency sounds sound "lower". Try it and see? --Rdm (talk) 19:40, 13 December 2013 (UTC)
Hi Rdm, Thanks for the reply. I think the problem is that there is nothing on the page to show the relationship between the 1,1,1,1,0,0,0,0 and the output numbers. I suppose this might be obvious to someone completely familiar with fourier transforms, but without a guide "key" I can't see it. Usually at least two examples are the minimum needed to show the working of a function (if the function mechanics are not terribly obvious). For me, it isn't so important to just be told "Put X into Y and you should get Z" (although that would be nice) but rather an explanation of why X into Y yeilds Z. - It's a similar problem with Wikipedia maths articles - they are all shorthand maths-professional to maths-professional articles and take a bit of figuring out. I don't mind figuring stuff out but need a bit more to go on (eg, more than one example data set). Eg, suppose I were to input 100ms of samples at a sampling rate of 22khz, mono, 16 bit - I would expect to see an array of frequencies output, but looking at the code, I can't immediately see what the resolution of that output array would be (how many elements), and how it knows that a window of 100ms worth of samples have been input.

This is the closest thing I have found so far to an easy-to-read code block, and I am very grateful to have found it here (I'm looking mostly at the C++ one, but having all the different languages here make it much easier to see the common elements of the code) but it isn't quite complete. A few more examples of input/output data would be a huge help to anybody reading this (any language) Thanks again for writing-

Sam