필터 지우기
필터 지우기

play audio song in background of my project

조회 수: 6 (최근 30일)
reema
reema 2014년 8월 14일
댓글: reema 2014년 8월 16일
i want to play the audio tone(song), when my project GUI run ,,i have 3 GUI of my project which are linked with each other ,,...i want tooo play tone in background until my project is run.. can any on ehelp meee how can i play:
  댓글 수: 2
Joakim Magnusson
Joakim Magnusson 2014년 8월 14일
What format is the sound file?
reema
reema 2014년 8월 14일
sound in mp3 or format or wav form

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

채택된 답변

Joakim Magnusson
Joakim Magnusson 2014년 8월 14일
편집: Joakim Magnusson 2014년 8월 14일
If you have a .wav file i think this will work. First load your file:
[y f]=audioread('yourMusicFile.wav');
Then play audio with:
sound(pl);
Stop sound with:
clear playsnd;
  댓글 수: 28
reema
reema 2014년 8월 16일
and when me use this code also your recommended:
persient player;
[y f]=audioread('21.mp3');
player = audioplayer(y,f);
play(player);
then error show:
Undefined function 'persient' for input arguments of type 'char'.
Error in Face_Detection_And_Recognition>Face_Detection_And_Recognition_OutputFcn (line 96)
persient player;
reema
reema 2014년 8월 16일
sir do you have any idea about voice effects in matlab? i want to generate voice with effect...i have simple recorded voice and want to hear in voice efects(sound effects)..

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

추가 답변 (1개)

Sean de Wolski
Sean de Wolski 2014년 8월 14일
audioplayer can play without play blocking (so your other processes and continue).
  댓글 수: 3
Sean de Wolski
Sean de Wolski 2014년 8월 14일
When you play a song with sound, it blocks audioplayer does not so you can have your code running.
Read the example in the doc linked or at:
doc audioplayer
reema
reema 2014년 8월 14일
but when me use the audioplayer then i can;t hear the song

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

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by