Playing wav/midi

Hi all. Is there a way to play wav and midi files in Matlab? I'm want to do something like:
%Generate a number from 1 to 3;
x = ceil(rand(1)*3);
switch x
case 1
??play('irish.mid')??
case 1
??play('beep.wav')??
case 1
??play('splash.wav')??
end

Respuestas (2)

Fangjun Jiang
Fangjun Jiang el 11 de Ag. de 2011

0 votos

Does this give you an idea?
system('C:\WINDOWS\system32\dllcache\wmplayer http://www.satelitemusical.net/mj-akon-hold-my-hand.wma')
or
m=wavread('toilet.wav');
sound(m);
or
beep
Frank
Frank el 11 de Ag. de 2011

0 votos

Thanks, but I found the answer:
load ***.mat
sound(y, Fs)

1 comentario

Daniel Shub
Daniel Shub el 11 de Ag. de 2011
Please accept your answer to your question if you are happy with it.

Iniciar sesión para comentar.

Categorías

Más información sobre Simulation, Tuning, and Visualization en Centro de ayuda y File Exchange.

Preguntada:

el 11 de Ag. de 2011

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by