How to run this matlab file?

조회 수: 3 (최근 30일)
jérôme TAÏEB
jérôme TAÏEB 2018년 9월 30일
편집: Walter Roberson 2018년 9월 30일
Hi,
Attached file m with a delay function
How in the windows command apply this function or this .m file to the audio file 'musique.mp3' via:
audioread ( 'music.mp3');
?
thanks
  댓글 수: 1
Walter Roberson
Walter Roberson 2018년 9월 30일
That is not valid code. It looks like you modified existing code.

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

채택된 답변

Walter Roberson
Walter Roberson 2018년 9월 30일
편집: Walter Roberson 2018년 9월 30일
[data, fs] = audioread('music.mp3');
gain = rand() * 2;     %need _some_ value
delaytime = rand() * 3;  %need _some_ value
%delay code can only handle one channel at a time
for ch = 1 : size(data, 2)
  delayed_sound(:,ch) = delay(data(:,ch), gain, delaytime, fs);
end
sound(delayed_sound, fs)

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Audio and Video Data에 대해 자세히 알아보기

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by