▲ | trgn 5 days ago | |||||||
Can somebody eli5, im an amateur. How does the transform know the frequencies of the output. Do you have to specify a number n, and then it decomposes it into n frequencies. Or do you give it a list of frequencies, and then it decomposes the coefficient or amplitude or something for each? I guess what i want to know, in the examples it always shows like 3 or 4 constituents frequencies as output, but why not hundreds or a million? Is that decided upfront /paramtetizable? The article isn't helpful, it just says something like "all possible frequencies". | ||||||||
▲ | IAmBroom 5 days ago | parent | next [-] | |||||||
I'll try. Suppose you blinde, and are on one side of a black picket fence. Let's say the fence uprights are 1" wide, and 1" apart. If you aim a light meter at the fence, it will sum up all the light of the visible slices of the background. (This meter reads its values out loud!) Suppose the background is all white - the meter sees white slices, and get a 50% reading (because the fence stripes are black). It's as high as you can get. Now move the picket fence half an inch to the left - still all white, still a 50% reading. Now you know the background is 100% white, no other colors. But if when you move it, black stripes are exposed, then the meter reads 0%, and you know that the background is 50/50 white and black, in stripes. Congratulations! You've just done a Fourier transform that can detect the difference between 0-frequency and a 1"-striped frequency pattern. In reality, you're going to continuously move that fence to the left, watching all the time, but this is simple. But instead, imagine you got readings of 40% and 10%. What kind of pattern is that? Gray stripes? White stripes that aren't as wide as the fence posts? You'll have to build another fence, with another spacing - say 1/2" fence posts 1/2" apart. Repeat. | ||||||||
| ||||||||
▲ | woopsn 5 days ago | parent | prev | next [-] | |||||||
If you take N samples of a real signal you will get N/2+1 bins of information from the DFT, covering 0Hz out to about half the sampling rate. The bins do not actually measure a specific frequency, more like an average of the power around that frequency. As you take more and more samples, the bin spacing gets finer and the range of frequencies going into the average becomes tighter (kind of). By collecting enough samples (at an appropriate rate), you can get as precise a measurement as you need around particular frequencies. And by employing other tricks (signal processing). If you graph the magnitude of the DFT, signals that are a combination of power at just a few frequencies show just a few peaks, around the related bins. Eg a major chord would show 3 fundamental peaks corresponding to the 3 tones (then a bunch of harmonics) https://en.wikipedia.org/wiki/Fourier_transform#/media/File:... So you detect these peaks to find out what frequency components are present. (though peak detection itself is complicated) | ||||||||
▲ | dsego 4 days ago | parent | prev | next [-] | |||||||
Maybe this will help https://dsego.github.io/demystifying-fourier/ | ||||||||
▲ | slickytail 5 days ago | parent | prev [-] | |||||||
In a discrete Fourier transform, the number of frequencies you get out is the number of datapoints you have as input. This is because any frequencies higher than that are impossible to know (ie, they are above the sampling frequency). But in the continuous Fourier transform, the output you get is a continuous function that's defined on the entire real line. |