Maximizing Your Sound System: Understanding FFT and Low Frequencies"

In summary: If you are using electronically sourced tones then why not feed them directly (electrically) into your analyser? That will eliminate all the ambient noises. When you have checked your system out this way then, by all means, use a microphone to listen to 'real instruments'.
  • #1
btb4198
572
10
so my fft is working for notes 8b-1G# so from 7902 Hz to 51.91 Hz
after that it says 46.25 Hz is the same 49.00Hz : notes 1F# and 1G.

it then says notes 1E and notes 1F are the same (41.20Hz, 43.65Hz)

I am using this site :
http://onlinetonegenerator.com/?freq=5000

to product the sine-wave and my roommate has a really nice surround sound system to play the Frequencies...
I hook my ipod up to it and was able to play the sine-waves

so is this normal ?
I know 49.00Hz was really low...
also how low of a Frequency can I play on a surround sound system before I misses up the speakers ?
or my ears ?
 
Engineering news on Phys.org
  • #2
In order to answer this we need more information. What is your sample rate? How many samples were you using? Note that if you want to resolve frequencies ~2 Hz apart, then you need to use at least 0.5 seconds of data as input to your FFT.

jason
 
  • #3
44100 sampling rate
32768 samples at a time
 
  • #4
are you applying a taper prior to the fft?
 
  • #5
so I upload that youtube video :


I have a filter in that i drop any Frequencies with a Magnitude less then 300000
this is so I can cut out noise
 
Last edited by a moderator:
  • #6
The plots in that video look a complete mess at low frequencies. Even at high frequencies like 440 Hz you are picking up stray noise from a car outside, etc (you can see it on the FFT and hear it on the video).

I would start by plotting several cycles of the wave in the time domain, not just the few points you have on the screen. At 49 Hz and 44100 samples/sec, there are 900 sample points in one cycle, so you want to plot a graph of 5000 or 10000 samples to see what the data looks like. (Yes I know the resolution of your computer monitor is less than 5000 pixels wide, but don't worry about that, just plot the graph.)

Putting your microphone as close as possible to one of the loudspeakers might help.

If you don't have something that actually looks like a sine wave with a reasonably large amplitude, the FFT won't separate the signal and the noise by magic.
 
  • #7
how do you know that At "49 Hz and 44100 samples/sec, there are 900 sample points in one cycle"?
also If I plot 5000 samples at a time, my program will compress the graph and it would be hard to see anything, right ?
 
  • #8
btb4198 said:
how do you know that At "49 Hz and 44100 samples/sec, there are 900 sample points in one cycle"?
I divided 44100 by 49.
also If I plot 5000 samples at a time, my program will compress the graph and it would be hard to see anything, right ?
You should see about 5.5 cycles of a sine wave across the width of the graph. if you see a mess, something is wrong somewhere.
 
  • #10
There must be something wrong with the way you are reading the audio data. The plots on the video look like they are mostly noise.

I downloaded a 49 Hz file from your tone generator site and played it in Windows Media Player. The Media Player display looks like this - a nice clean sine wave.

attachment.php?attachmentid=66270&d=1391483481.png


It might be a bug in your code, or a poor quality microphone and sound card on your PC, or you are working in a noisy environment.
 

Attachments

  • 49 hz.png
    49 hz.png
    6.9 KB · Views: 620
  • #11
ok so no it is not a noisy environment. at the end of the video one of my roommates came in, but that is it. before that is was not a noisy environment.

yeah there is a lot of noisy in my input .. I do not know why...
but I have to do a filter before I output the fft to the graph ...

I say any frequencies with a Magnitude less then 3000000 .. do not output...
 
  • #12
is that very bad?
 
  • #13
If you are using electronically sourced tones then why not feed them directly (electrically) into your analyser? That will eliminate all the ambient noises. When you have checked your system out this way then, by all means, use a microphone to listen to 'real instruments'. "One step at a time" is a good Experimenter's motto.
 
  • #14

ok look that this youtube
sorry the video misses up at times, but you can see all the needed information
I changed the setting to my Mic...
and it looks a lot different ...
but I do not know what is the best setting for the mic
 
Last edited by a moderator:
  • #15
I say any frequencies with a Magnitude less then 3000000 .. do not output...

that doesn't make sense

3 million what ?


Dave
 
  • #16
dBA ... or double dBA ... I read in the values from the Mic as doubles and pass them to the FFT
 
  • #17
AlephZero said:
I divided 44100 by 49.

You should see about 5.5 cycles of a sine wave across the width of the graph. if you see a mess, something is wrong somewhere.

If you have 5.5 cycles of the sin wave on your time array, then , without some intelligent windowing, you will get significant components at 10/11 (I think that's the ratio) of your 'real frequency - plus harmonics and sidebands.
 
  • #18
btb4198 said:
sorry the video misses up at times, but you can see all the needed information

Looking at a still from your video
attachment.php?attachmentid=66303&d=1391559061.png


It looks like you have two sine waves, with different amplitudes and 90 degrees out of phase with each other, and you are taking data points alternately from each one.

I think you need to fix that problem first.

Possibly you are reading stereo audio data but thinking it is mono, so you are taking alternate signals from the left and right channels. That might also explain your earlier problem with your FFT frequencies being wrong by a factor of 2. But that doesn't explain how where the stereo data is coming from. Maybe the Mac audio system is somehow merging the data from the tone generator website on one channel, and the data from microphone on the other channel, and the phase difference is because distance between your loudspeaker and the mike just happens to be 1/4 of a wavelength at that frequency. But I'm not a Mac user, so I'm just guessing here.
 

Attachments

  • toner test 2.png
    toner test 2.png
    22.6 KB · Views: 657
  • #19
btb4198 said:
I say any frequencies with a Magnitude less then 3000000 .. do not output...

Calculating the FFT from noisy data, and then trying to ignore some of the FFT frequencies, won't help. You need to fix the reason why the data is noisy before you do the FFT.
 
  • #20
sophiecentaur said:
If you have 5.5 cycles of the sin wave on your time array, then , without some intelligent windowing, you will get significant components at 10/11 (I think that's the ratio) of your 'real frequency - plus harmonics and sidebands.

Agreed, but I don't think the OP has got as far as hitting that problem yet.
 
  • #21
AlephZero said:
Looking at a still from your video
attachment.php?attachmentid=66303&d=1391559061.png


It looks like you have two sine waves, with different amplitudes and 90 degrees out of phase with each other, and you are taking data points alternately from each one.

I think you need to fix that problem first.

Possibly you are reading stereo audio data but thinking it is mono, so you are taking alternate signals from the left and right channels. That might also explain your earlier problem with your FFT frequencies being wrong by a factor of 2. But that doesn't explain how where the stereo data is coming from. Maybe the Mac audio system is somehow merging the data from the tone generator website on one channel, and the data from microphone on the other channel, and the phase difference is because distance between your loudspeaker and the mike just happens to be 1/4 of a wavelength at that frequency. But I'm not a Mac user, so I'm just guessing here.

sorry but I do not understand... why does it look like I am " reading stereo audio data but thinking it is mono"?
 
  • #22
The code you posted (in a different thread) read an array of data as 8-bit bytes, and then converted each pair of bytes to a 16-bit value.

For stereo data, the buffer will contain

Sample 1 left channel
Sample 1 right channel
Sample 2 left channel
Sample 2 right channel
Sample 3 left channel
Sample 3 right channel

etc.
 
  • #23
oh i just check my setting and it is
2 channel, 16bit, 48000HZ(DVD Quality)

and this is the code I am using now to read in
Code:
 for (int index = 0; index < 32768; index += 2)
            {

                buffer1[tempint] = ((buffer[index + 1] << 8) |
                                      buffer[index + 0]);
                
                if (buffer1[tempint] > 32767)
                    buffer1[tempint] = buffer1[tempint] - 65536;

                tempint++;

            }
 
  • #24
So my guess was right. "2 channel" means stereo.
 
  • #25
so I am new to this...
does this mean I am reading in the data wrong?
if so how can I fix that ?
 
  • #26
Find out how to set up the Mac audio so it generates an audio data stream with one channel (not two), coming from your microphone.

Then find out how to make C# read that audio data stream, and not a different one.

I'm not a Mac user, so I don't know how to do those things. The only thing I know about Mac audio (from other forums on computer music) is that there are lots of options you can change!
 
  • #27
That's a Mac in the video?
 
  • #28
NO Dell
 
  • #29
and I am programming with C# Microsoft Visual C# express ...
there is not Mac here
 
  • #30
Sorry, I must have misread something. I thought you had mentioned Mac or Apple in one of your posts, either in this thread or one of the others.

But you still need to do the same two steps:

Find out how to set up the Dell audio so it generates an audio data stream with one channel (not two), coming from your microphone.

Then find out how to make C# read that audio data stream, and not a different one.
 
  • #31
This is confusing. If you are dealing with the acoustic input from a microphone then what has the source data got to do with it?
I still don't know why you need to use acoustic connection. What's wrong with a double ended jack lead?
If you are using C, then you can surely extract alternate samples from any audio file you want to analyse. There seems to be a'big hole' in all this and I'm not sure what's missing.

It could help you and us if you were to draw a block / function diagram of what you are doing. There just has to be a straightforward answer to your basic problem.
 
  • #32
Ok so

I am using a built in computer microphone. so there are no connect to be make.
sound1.jpg


And I am using a Dell Computer...

now my problem comes in with noise in my input ...
so there no noise in my room but I get this :
graph.jpg


and this is which
Math.Abs(F.Magnitude) > 300000
 
  • #33
You need to go right back to square one and check out each individual link in the chain.
If you record 'silence' and then a burst of high level 1kHz, what does the straight play back sound like? Noisy? Also, what does high level 1kHz look like when plotted on those two graphs ("my test graph")?
The make of the computer should not be important for this. If it has an internal microphone, does is have an identifiable sound card or does it not have 'slots'?
 
  • #34
ok here is how it looks:
mytestgraph.jpg
 
  • #35
You missed out the y-axis on the latest pics. but it looks ok. However, I wonder if you have just set the gain of the mic to auto and you are just seeing a scaled up version of the most recent pictures in the previous pictures.
You should find that somewhere in the options.
 

Similar threads

Replies
9
Views
1K
  • Biology and Medical
Replies
6
Views
394
Replies
2
Views
2K
Replies
11
Views
3K
Replies
9
Views
1K
Replies
1
Views
10K
  • Introductory Physics Homework Help
Replies
2
Views
3K
Replies
3
Views
16K
  • Introductory Physics Homework Help
Replies
2
Views
4K
Replies
2
Views
6K
Back
Top