07-20-2010 05:47 PM
Hey guys
I am currently working on my thesis research and I am trying to program a sweep freqeuncy generator. I have been able to generate a Sweep frequency V.I using a template and modifying it to play sound on a 16 bit sound card. The problem is I need to be able to input a equal loudness level contour signal so that the freqeuncy sweep sounds equally loud across the frequencies. I have managed to find an iso 226 equal loudness contour signal on line but it was written in Matlab coding. I know it is possible to use script node to execute this file for use in labview but I am unsure of how to go about doing this after I load the iso 226 script into the script node. I have uploaded the sweep freqeuncy and the iso 226 code (its an m file). Would greatly appreciate any help I can get as I have only been using labview for a couple of weeks and I am finding it very difficult to program what I want to achieve.
Cheers
Anthony
07-22-2010 11:45 AM - edited 07-22-2010 11:45 AM
Hey Anthony,
If you have a pre existing .m file, you have a couple of options. First of all, you can stay within the LabVIEW environment and have the LabVIEW MathScript RT Module or MathScript Support installed you can use the MathScript Node within your block diagram to add your MathScript to your VI. You can also use the MathScript Window in LabVIEW to create your own .m files. Both of these methods are found in this Developer Zone article.
The most up to date list of the MathScript functions and their description/syntax can be found here.
Logan H
08-11-2010 08:43 PM
Hi Logan
Thanks for your guidance with mathscript node, I found it quite useful.
After understanding that the first algorithm that I was using was incomplete, I found a new algorithm which plays the sweep tone without any discontinuities in the signal. However after adding the equal loudness contour VI to the program, it sounds like the loudness fluctuates. I have tried using a new sound output system on the program but it still sounds like the sweep level changes, especially in the beginning of the sweep, and then as the sweep progresses. I would greatly appreciate any input you may have as to where I may be going wrong. I have uploaded the files as well.?
Cheers
Anthony
11-11-2010 09:20 PM
Hi antz007 / Anthony
What frequency range you are trying to operate / to sweep?
I think you should also consider checking your loudspeaker / speaker. It really depends on your driver i.e. speaker's frequency response. From your explanation above, you mentioned that you are getting a poor loudness at the lower frequency end. From that I can tell that your speaker (PC speaker - I am guessing) is quiet poor at the lower end. You should get an external speaker / driver with good frequency response i.e. flat response from lower to higher end with a smooth roll-off.