LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Noise isn't right when making a frequency sweep

Hello,

 

I am writing a basic VI in LabVIEW 2020 32-bit. 

 

It is for a physics lab class. The idea is to test the range of human hearing versus frequency to "hear how old your ears are".

Generally, the human ear can hear ranges between 20-20K Hz, but as you get older, the higher frequencies become impossible to hear, and those with ear damage also have smaller rangers in hearing, etc. 

 

Anyways, I built a VI that starts at 0 Hz and increases to 20K by 10Hz steps. The issue I am having is there are extra sounds being made.

It isn't just that single sweep higher, and higher, there are extra tones and noises being generated and I don't know how to resolve this issue. The high pitch gets lost too early based on these extra noises. 

 

Any help would be appreciated. 

0 Kudos
Message 1 of 5
(172 Views)

I did try your vi and had the same results. There is an example vi called Generate Sound that your vi seems to be based on and when I changed the frequency input to your method of changing, I did not hear the artifacts anymore. Really, the only difference is the example uses an express vi to generate the signal. It will take me awhile to figure how the express vi is different. You only have to open the front panel to see the "internals"  🤔

 

Robert

0 Kudos
Message 2 of 5
(144 Views)

When using the Express VI, I didn't hear the extra tones, but I do hear a discontinuity at each frequency change. That clicking makes sense as the Express VI generates the tone in a finite sample mode, so the output temporarily stops before the next frequency is output. When using the VI attached, I also hear the extra tones added. This may be cause by the transition behavior introduced by the driver when the input signal is changed. As an experiment, generate your sweep into one long (appended) waveform and try outputting the sweep using a finite sample mode.

Doug
NI Sound and Vibration
0 Kudos
Message 3 of 5
(64 Views)

You should probably have the frequency spacing increase logarithmically, since that's how ears work.  A 10 Hz step means much more at 50 Hz than it does at 10 kHz.  Think in terms of octaves.  Steps per octave, to be exact.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
Message 4 of 5
(51 Views)

And while you are studying,   weight those tones!  Yup, the human ear doesn't have a single point where every note is as loud as other notes.

 

And yes, I CAN sing!


"Should be" isn't "Is" -Jay
Message 5 of 5
(33 Views)