필터 지우기
필터 지우기

How can I add 3 audio files in matlab?

조회 수: 1 (최근 30일)
sedanur yildirim
sedanur yildirim 2022년 10월 29일
답변: Walter Roberson 2022년 10월 29일
I want to combine 3 different audio files recordings with each other, how can I do this?

답변 (1개)

Walter Roberson
Walter Roberson 2022년 10월 29일
You first read each of the three files using audioread
After that you have decisions to make:
  • When you say "add" do you mean that you want to concatenate, or do you mean you want a multichannel output, or do you mean that you want to sum the signals time-by-time as-if they had all originally been playing at the same time
  • How do you want to handle the situation where the files are not all exactly the same sampling frequency? Do you want to resample everything at the lowest frequency or at the highest frequency?
  • How do you want to handle the situation where the files do not all have exactly the same number of input channels? Do you want to take the minimum number of channels? Do you want to duplicate channels if need-be to reach the maximum number of channels? If you have multi-channel input for a file, do you want to mix it down to a single channel?
  • How do you want to handle the situation where after adjusting for frequency, the samples are not all the same length? Do you want to zero-pad so some sections of the output might represent only one input (maximum value: 1), some might represent two inputs (maximum value: 1+1 = 2), and some sections of output might represent three inputs (maximum value: 1+1+1 = 3) ? At each time, do you want to take the mean() of the signals actually available for that time span?

카테고리

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