How do I convert a piece of music in .mp3 format to a .mat format?
7 views (last 30 days)
Show older comments
I'm building an app using the guide function in matlab and would like to include a music file as part of my app. I know that one way to do this is to use a .mat file, how do I convert an .mp3 file to a .mat file? or is there a better way to include an audio file into a GUI?
0 Comments
Answers (1)
Azzi Abdelmalek
on 1 Aug 2013
Edited: Azzi Abdelmalek
on 1 Aug 2013
[y,fs]=audioread('youfile.mp3');
save new_file y fs
% to listen to the music type
sound(y,fs)
2 Comments
See Also
Categories
Find more on Audio and Video Data in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!