From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Adaptive LMS filtering and WAV file formatting

Hello Everyone!

1-i want to make an adaptive noise cancellation filter to remove noise from audio signals. for this, I use an adaptive filter toolkit. and used a normalized LMS method to remove noise, at noise ref we use a noise portion of signal but I don't get a good result, the filtered signal same as the input signal but at specific chunk that I use as a noise ref is mute but the remaining portion of the signal is same. I need your opinion in this regard.

2- I also have another question, I want to add a meta chunk in .wav(RIFF) file header which has a specific size and we add customize info like rf freq, channel No. in it?

thanks in advance

 
 
0 Kudos
Message 1 of 10
(2,600 Views)

Since you attached neither all the code you used (so we can examine, edit, and test it) nor data examples, the best comment for Point 1 is "You are doing something wrong, so fix it".

 

As for the second point, I believe details of the WAV format are published, so you (in principle) could using LabVIEW's File I/O functions to read the WAV file as a file of bytes, decode it (using LabVIEW) into its "WAV" components, synthesize and create new components that you want, and then re-assemble the WAV file.  Alternatively, you might be able to find "Audio Editing" software out there that will do this for you.

 

Bob Schor

0 Kudos
Message 2 of 10
(2,545 Views)

thanks Bob for your reply,

i attached the filter Vi that I use, you see this  vi,

secondly for wav file header you have any example vi or document to add meta chunk in XML format into wav file header,kindly attach

0 Kudos
Message 3 of 10
(2,528 Views)

For a description of the WAV (RIFF) file format, search the Web (suggested search term:  "WAV").

 

Bob Schor

0 Kudos
Message 4 of 10
(2,499 Views)

Dear Bob Schor,

I already search the description of Wav file format, but I don't know how to add meta chunk in xml format into wav file header using Labview?

kindly review my attached VI (in previous reply) of LMS Adaptive Filtering and guide me in this regards

thanks 

0 Kudos
Message 5 of 10
(2,466 Views)

Hi Aht,

 


@Aht22 wrote:

I already search the description of Wav file format, but I don't know how to add meta chunk in xml format into wav file header using Labview?


A generic description of the WAV/RIFF file format is given here.

When you want to add chunks you can use plain file functions to do so…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 10
(2,447 Views)

thanks, GredW for your reply !

1- i attached the vi, which I use to write a header, some basic info was written using this VI (format, no of samples, data size,)but I want to add extra chunk this VI not write Info to the header, please see this vi and try to identify the issue.

2- kindly see another vi of Adaptive filtering ( i upload in the previous reply),i want to filter noise from wav audio file,for this i use FIR normalized filter, use some part of noisy signal as noise reference, the filter filtered the specific portion of audio but other signal didn't filter and noise remains same,kindly check whats the issue in this filter design 

i am waiting for your reply. 

0 Kudos
Message 7 of 10
(2,443 Views)

Hi Aht,

 


@Aht22 wrote:

thanks, GredW for your reply !

1- i attached the vi, which I use to write a header, some basic info was written using this VI (format, no of samples, data size,)but I want to add extra chunk this VI not write Info to the header, please see this vi and try to identify the issue.


Well, please try again in writing my (nick)name correctly…

 

Some comments on writing the WAVE file with your VI:

You already seem to know how to create chunks in the RIFF file. What's your problem to add one more chunk?

You should show the display style for ALL string constants! I think the "WAVEmeta\s" constant is wrong in two ways: it's set to the wrong display style and the additional space is wrong…

You can directly connect the error wire to the case structure selector, no need to unbundle the status boolean…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 10
(2,437 Views)

sorry  gerdW for writing your name wrong,i'll be careful next time,

1- i correct the display format as well as the extra space but no change in result...

2- I attached the filtering VI kindly help me to  resolve this issue regarding Adaptive noise cancellation filter

0 Kudos
Message 9 of 10
(2,432 Views)

HI,

 

Aht decided to continue the filtering part of the questions here in a new thread.

I guess this one will handle the RIFF file creation…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 10 of 10
(2,414 Views)