Playing a Music File from Matlab

  • Context: MATLAB 
  • Thread starter Thread starter brydustin
  • Start date Start date
  • Tags Tags
    File Matlab Music
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 11K views
brydustin
Messages
201
Reaction score
0
I would like to run a calculation so that when it has converged, a song will play... to alert me from the other room (for example).

http://www.mathworks.co.uk/help/techdoc/ref/audioplayer.html

I found this but can't quite put it together? Their example was:

Examples

Load and play a sample audio file of Handel's "Hallelujah Chorus:"

load handel;
player = audioplayer(y, Fs);
play(player);

I'm not clear on this... Okay, so any explanations greatly appreciated; also, you are welcome to suggest a tune to play once convergence is met (its a non-linear least squares problem, maybe it will inspire the tune :O)
 
Physics news on Phys.org