|
|
Analog audio filter in Simulink
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!
|
|
0
|
|
|
|
Reply
|
John
|
10/20/2010 3:31:04 PM |
|
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.
|
|
0
|
|
|
|
Reply
|
John
|
10/26/2010 1:13:03 PM
|
|
"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...
|
|
0
|
|
|
|
Reply
|
Chrome33 (1)
|
6/27/2012 3:44:09 PM
|
|
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!
|
|
0
|
|
|
|
Reply
|
john.jendzurski (3)
|
6/27/2012 7:19:06 PM
|
|
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.
|
|
0
|
|
|
|
Reply
|
john.jendzurski (3)
|
6/27/2012 7:37:07 PM
|
|
|
4 Replies
627 Views
(page loaded in 0.101 seconds)
|
|
|
|
|
|
|
|
|