concatenate audio files in simulink

조회 수: 3 (최근 30일)
Katarina Vuckovic
Katarina Vuckovic 2020년 4월 3일
댓글: Katarina Vuckovic 2020년 4월 4일
How can I concatenate 2 or more audio (.wav) sounds into one?

채택된 답변

jibrahim
jibrahim 2020년 4월 3일
Hi Katarina,
Use two 'From Multimedia File' blocks to read the wav files.
There are multiple ways of concatenating two signals in simulink.For example:
  댓글 수: 5
Walter Roberson
Walter Roberson 2020년 4월 4일
Output end-of-file indicator
Use this check box to determine whether the output is the last video frame or audio sample in the multimedia file. When you select this check box, a Boolean output port labeled EOF appears on the block. The output from the EOF port defaults to 1 when the last video frame or audio sample is output from the block. Otherwise, the output from the EOF port defaults to 0.
Katarina Vuckovic
Katarina Vuckovic 2020년 4월 4일
Right now I am able to get it to work by triggering the two audio files to be on/off using a constant pulse. This works only if the messages are constant duration. However if the messagase are of variable duratio, I don't know how to detect that the first message has ended.

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

추가 답변 (1개)

Katarina Vuckovic
Katarina Vuckovic 2020년 4월 4일
Hi Walter, if I play one on the left channel and one on the right, wouldn't they still be playing at the same time instead of one after the other?
  댓글 수: 1
Walter Roberson
Walter Roberson 2020년 4월 4일
Yes. My explanation was for how it happened that they were playing at the same time. The cure is to ensure that you concatenate on the first dimension instead of the second.

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

카테고리

Help CenterFile Exchange에서 Audio I/O and Waveform Generation에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by