Reputation: 1885
I have a multimedia file block in Simulink, and I'm using it to play out of my speakers. It's working fine, but I'm wondering if there's a way to extract the signal in MATLAB using get_param or something similar. I want to plot the entire signal on a GUI, so I need to have the entire signal before I play it.
Upvotes: 0
Views: 1605
Reputation: 1885
I ended up using a dsp.AudioFileReader
to read my song. Not even bothering with the from Multimedia File, because I don't know how to get the entire signal from that quickly (it outputs at the sampling rate, I wanted to plot the signal before playing the song).
I created a while loop and step
ped through the dsp.AudioFileReader quickly enough and then played my song through the multimedia block.
Upvotes: 1
Reputation: 24127
Can you connect your multimedia block to a 'To File' or a 'To Workspace' block? That would save the signal to a file that you could later load in, or directly to a workspace variable. You could then plot it, or incorporate it into your GUI, within MATLAB.
Upvotes: 0