Thread Subject:
Analog audio filter in Simulink

Subject: Analog audio filter in Simulink

From: John Jendzurski

Date: 20 Oct, 2010 15:31:04

Message: 1 of 5

I've got a transfer function for an audio analog filter, eg. H(s) = N(s)/D(s). Is there a way in Simulink I can run a wave file through this? I am guessing I can use the "From Wave File" block and the "To Audio Device" block for the inputs and outputs to/from Simulink. And I can use the "Transfer Fcn" block for my H(s). But it seems like I need some way to convert from a discrete signal to a continuous signal then back to discrete.

Thanks!

Subject: Analog audio filter in Simulink

From: John Jendzurski

Date: 26 Oct, 2010 13:13:03

Message: 2 of 5

I did eventually figure out a way to do this. It involved using c2d() to convert the continuous network function to discrete. Then I used the polynomials from that as filter coefficients in one of the Simulink digital filter blocks. Then I read the wave file into Matlab using wavread(). A few more details left out here, but in the end I was able to apply the transfer function to a distorted audio file and play the nice cleaned up version through the PC sound card in "real" time while viewing both waveforms on scopes and spectrum analyzers. It made for a nice demo. I can elaborate if there is any interest.

Subject: Analog audio filter in Simulink

From: Erik

Date: 27 Jun, 2012 15:44:09

Message: 3 of 5

"John Jendzurski" wrote in message <ia6k4v$3cd$1@fred.mathworks.com>...
> I did eventually figure out a way to do this. It involved using c2d() to convert the continuous network function to discrete. Then I used the polynomials from that as filter coefficients in one of the Simulink digital filter blocks. Then I read the wave file into Matlab using wavread(). A few more details left out here, but in the end I was able to apply the transfer function to a distorted audio file and play the nice cleaned up version through the PC sound card in "real" time while viewing both waveforms on scopes and spectrum analyzers. It made for a nice demo. I can elaborate if there is any interest.

Yes John may you go into detail on how you did this process please...

Subject: Analog audio filter in Simulink

From: John Jendzurski

Date: 27 Jun, 2012 19:19:06

Message: 4 of 5

Hi Erik, I just posted the Simulink file to the File Exchange. It said it may take up to 5 days for the file to be processed and made available for download. I'll post a direct link to it when that processing is completed. Hopefully it will be helpful!

Subject: Analog audio filter in Simulink

From: John Jendzurski

Date: 27 Jun, 2012 19:37:07

Message: 5 of 5

Looks like it's up:

http://www.mathworks.com/matlabcentral/fileexchange/37333-audio-filter

If you have any questions just let me know. While it is a pretty simple simulation, it was difficult (for me) to figure out a lot of details to get it to work properly in Simulink.

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread

Contact us