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

답변 (2개)

Fangjun Jiang
Fangjun Jiang 2011년 8월 11일

0 개 추천

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 2011년 8월 11일

0 개 추천

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

댓글 수: 1

Daniel Shub
Daniel Shub 2011년 8월 11일
Please accept your answer to your question if you are happy with it.

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Simulation, Tuning, and Visualization에 대해 자세히 알아보기

질문:

2011년 8월 11일

Community Treasure Hunt

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

Start Hunting!

Translated by