04-02-2009 08:09 AM
Hi,
I'm trying to apply A-weighting filtering to an audio signal.
I'm to plot the filter response in frequency domain.
How can I transform this to a time domain filter and use it with a real audio signal ?
Solved! Go to Solution.
04-02-2009 09:46 AM
04-02-2009 09:55 AM
Actually, applying the formula directly to the spectrum is what I'm doing. However, I need to go through all the spectrum (22050 points) and this needs some computation time. As I was planning to do it in real time, a digital filter would be probably better but, as you say, it's a lot of work. I will probably keep the easiest solution.
Thanks
04-02-2009 10:12 AM
04-03-2009 12:54 AM
I've already done the filter. But it takes some seconds to be applied.
Is there any way to do it better ?
04-03-2009 01:10 AM
I have modified the FOR Loop you have used for computation. Modified loop is coloured and i have attached it with this post. It works pretty fast.
Post back if you have trouble.
04-03-2009 01:19 AM
04-03-2009 01:25 AM
04-03-2009 05:51 AM - edited 04-03-2009 06:00 AM
Hi
You have made some progress, but your programming style is typical Labview newbie. You do not take advantage of the labview data flow. It is also very bad programming to use local variables, for cleaning up diagrams. Do NOT do it. Your use of frames is strange. They do not serve any purpose in your program, so you do not need them at all. Also you've got to ask yourself one question (Not, do I feel lucky? ). If you input 22050 samples to a power spectrum function, how many frequency bins do I get back ;). Also what is delta f. Browse through this http://zone.ni.com/devzone/cda/tut/p/id/4278 it is a good white paper. You did the correct thinking then adding the correction curve to the powerspectrum output, But the output units from the power spectrum VIs is Vrms^2 or Vrms depending on which function used. You have to scale it to Vpk. A simple task. I have included some VIs for you to look at. My examples takes 8 msec to execute, I guess faster if you do not have large waveform charts. So if you have .5 seconds update rate it should perform well.
Good luck with your school project
Edit Note how much faster my A weighting freq domain VI perform, compared to your.
04-03-2009 07:06 AM
Thanks for this answer... Learning a lot !
In which case are used local variables ?
If I have 2 loops running in parallel, both working with same variable, should I use a local variable ?