Maximizing Your Sound System: Understanding FFT and Low Frequencies"

  • Thread starter Thread starter btb4198
  • Start date Start date
  • Tags Tags
    Fft Frequencies
Click For Summary

Discussion Overview

The discussion revolves around the use of Fast Fourier Transform (FFT) to analyze sound frequencies produced by a sound system, particularly focusing on low frequencies and the challenges faced in obtaining clear sine wave outputs. Participants explore technical aspects of sound analysis, including sampling rates, noise filtering, and the impact of audio settings on the quality of FFT results.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Experimental/applied

Main Points Raised

  • One participant reports that their FFT is functioning for frequencies between 51.91 Hz and 7902 Hz, but notes confusion regarding the output for certain low frequencies, questioning if this is normal.
  • Another participant requests additional information about the sample rate and number of samples used to better understand the FFT results.
  • Participants discuss the importance of applying a taper before performing the FFT to improve results.
  • Concerns are raised about the presence of noise in the FFT outputs, with suggestions to plot more data points to visualize the waveforms better.
  • One participant mentions filtering out frequencies below a certain magnitude to reduce noise, prompting questions about the appropriateness of this threshold.
  • There is a suggestion to directly feed electronically sourced tones into the analyzer to eliminate ambient noise before using a microphone for real instruments.
  • Participants discuss the potential issues with reading stereo audio data as mono, which could affect the FFT results.
  • One participant expresses uncertainty about the settings for their microphone and how it affects the output.
  • Another participant emphasizes the need to address the noise issue in the data before applying FFT, as filtering after the fact may not resolve the underlying problems.

Areas of Agreement / Disagreement

Participants express varying opinions on the causes of noise in the FFT outputs and the effectiveness of the filtering methods employed. There is no consensus on the best approach to resolve the issues presented, and multiple competing views remain regarding the handling of audio data and settings.

Contextual Notes

Limitations include potential misunderstandings about stereo versus mono audio data, the impact of environmental noise, and the adequacy of the filtering methods used. Participants also highlight the importance of sampling rates and data visualization in achieving accurate FFT results.

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: 701
  • #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: 749
  • #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.
 

Similar threads

Replies
2
Views
3K
  • · Replies 11 ·
Replies
11
Views
6K
  • · Replies 27 ·
Replies
27
Views
5K
  • · Replies 12 ·
Replies
12
Views
1K
Replies
4
Views
3K
  • · Replies 11 ·
Replies
11
Views
6K
Replies
17
Views
6K
Replies
1
Views
10K
  • · Replies 3 ·
Replies
3
Views
17K
  • · Replies 2 ·
Replies
2
Views
4K