Maximizing Your Sound System: Understanding FFT and Low Frequencies"

  • Thread starter Thread starter btb4198
  • Start date Start date
  • Tags Tags
    Fft Frequencies
AI Thread Summary
The discussion focuses on maximizing sound system performance by analyzing low frequencies using FFT (Fast Fourier Transform). Users share experiences with generating sine waves and the challenges of capturing clean audio data, particularly at low frequencies like 49 Hz. Issues with noise interference and the importance of proper sampling rates and windowing techniques are highlighted, suggesting that the quality of the microphone and sound card can significantly impact results. Participants emphasize the need for accurate data collection methods, including using mono audio channels instead of stereo to avoid phase issues. Overall, the conversation underscores the complexities of audio analysis and the necessity of refining equipment and techniques for better sound clarity.
btb4198
Messages
570
Reaction score
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
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
 
44100 sampling rate
32768 samples at a time
 
are you applying a taper prior to the fft?
 
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:
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.
 
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 ?
 
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: 677
  • #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: 731
  • #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.
 
  • #36
ok sorry about the last pic:
mytestgraph2.jpg


now as for the setting of the Microphone there are not auto gain that I can see:
setting.png


listening.png

is there any other place I should look?
also do you know what Microphone Array does ?
wiki say's is it a "Systems for extracting voice input from ambient noise (notably telephones, speech recognition systems, hearing aids)"... and that is what I am trying to do..
 
  • #37
There must be some level control somewhere - that could still be your problem.
I have no idea about the "microphone array" but you could google PC Sound Control Microphone array.
I know the Apple user interface is very simple but limited (that's what I'm used to) but some of the Windows panels are total gobbledegook to me. I suggest you try the 'Levels', 'Configure', 'Properties' and you must find an audio input level adjust.
What software package is taking the sound into record it? Is there not a control there? The point is that the levels just don't seem to make sense. The noise seems to be higher on 'silent' than with the 1kHz - which implies some expanding is happening. Did you listen to the recording (on headphones or your friend's HI Fi) - you will need loads of Bass because the high level shash on your graph is all at 40Hz and below.

Your problem is that you are trying to do something sensible with some 'toy' kit for listening fun. Home stuff always falls short, one way or another. You just have to battle it out.

BTW, Microphone Arrays are used for directionality (as with radio antenna arrays). You have only one mike so I don't think that's relevant. I have two mikes on my deaf aids and one switch position claims to reduce sounds from behind. It uses a phase shift between them. It does work sometimes but never very well. Is that a tick I can see on the Mic Array setting on the control panel? I don't think that should be selected for serious stuff.
 
  • #38
ok i did not see any
 

Attachments

  • newpic.jpg
    newpic.jpg
    56.6 KB · Views: 464
Last edited:
  • #39
I refer to the picture of the control panel in Post 36.
 
Back
Top