Update: I am now using 'audioread' in MATLAB to load the audio file as a matrix of doubles. I am then combining the two stereo channels into one mono channel by averaging the two so I get a mx1 vector of doubles. Then I am using the "signal from workspace" block to pull that vector into my simulink model. I can now output the waveform of the audio on my scope and use it in my continuous time feedback loop. Now the one thing I am missing is conversion from continuous time signals to something that can be heard (I imagine using the Audio Device Writer block? this block accepts digital signals I believe..). Any suggestions?
Convert Audio File to Waveform
17 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I am trying to make a demonstration where I pass audio through a non-linear filter and hear the effect that the non-linearity has on the sound quality. I also want to see how feedback affects the output. In the attached Simulink model, I do something similar but with a simple sine wave as the input and a scope to visualize the output. I downloaded the Signal Processing Toolbox and the DSP System Toolbox and can now import my audio using the "From Multimedia File" block and then hear it using the "Audio Device Writer" block. However, since the output of the "From Multimedia File" block is a vector of audio data, rather than a waveform like the one coming out of the signal generator, I cannot pass it into a feedback loop with standard transfer functions. I know that there are audio filters available but I want to use my own filter and I think the easiest way to do that would be to somehow get the vector of audio data into the form of the output of a signal generator. Is there any way of doing this?
3 Commenti
Mathieu NOE
il 2 Mar 2021
hello
yes you can use the audio device write block
other wise you can export the simulink data using "to workspace" and then use the matlab audiowrite function
Risposte (1)
Shadaab Siddiqie
il 4 Mar 2021
From my understanding you want to convert audio file to waveform. Please refer audiowrite function. Also plot audio file waveform might help you to understand more about the topic.
Vedere anche
Categorie
Scopri di più su Audio I/O and Waveform Generation in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!