필터 지우기
필터 지우기

How to play multiple sound simultaneously in App Designer

조회 수: 6 (최근 30일)
Mo
Mo 2023년 4월 19일
댓글: Mo 2023년 4월 22일
Hi
I have 2 aduio files (beep.wav and the following tone:
t=0:1/8000:1-1/10000;
tone = sin(2*pi*1000*t);
Fs = 30000;
playertone = audioplayer(tone, Fs);
When I press a specific button for each sound to play them, the apps plays the sound in a order that I pressed the button rather than at the same time. Is there any way to play the sounds at the same time by pressing 2 separate push buttons? Some suggested to use Mean to play 2 sounds. How? Any help is appreciated.

답변 (1개)

Sarvesh Kale
Sarvesh Kale 2023년 4월 20일
Hi Mo,
You might find the following Matlab answer useful
the solution suggested is to average both the signals sample by sample
I hope this helps
Thank you
Sarvesh Kale
  댓글 수: 1
Mo
Mo 2023년 4월 22일
Hi I tried mean() but no success. I have 2 different sound plays in my code: one button activates horn.wav through sound() and another through audioplayer (). I’m wondered if using mean() for different audio input is possible? Can I use mean()to play 2 *.wav sounds?

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

카테고리

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

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by