Why does .m4a audio file (imported via audioread) get stored in workspace with two data series/data columns instead of just one?

조회 수: 22 (최근 30일)
Hi all,
i imported an .m4a audio file with following command: [yh fs]=audioread('background_noise.m4a').
Looking now in my workspace my data (yh) is stored as a 46080x2 double. Now i know that 46080 are my samples (nothing special) but I am wondering why my audio data is stored in two columns with slightly different values instead of just one column? I mean it is "just" an audio file, isn't it?
Can someone please tell me why that is and what information I get out of this?
I would be super happy for a quick reply/answer!
Best regards,
Johannes

답변 (1개)

Stephen23
Stephen23 2021년 9월 11일
편집: Stephen23 2021년 9월 11일
Clearly your audio file has two channels. The MATLAB documentation states that the first output is "... returned as an m-by-n matrix, where m is the number of audio samples read and n is the number of audio channels in the file."
  댓글 수: 4
Stephen23
Stephen23 2021년 9월 12일
"Should I take the average/mean of both signals ... and perform my analysis afterwords or should i treat both signals independently?"
Does your experiment encode any information in the difference between the two channels? For example, does the experiment design expect some kind of location information?
Rik
Rik 2021년 9월 12일
Unless you have actual stereo sound, it is very possible the difference between the two signals is very close to the measurement error. It might be helpful (depending on what exactly you're looking at) to process them independently and compare the results.
Some audio setups will also just duplicate their mono sound and store it as stereo, although your setup apparently does have true stereo.

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

카테고리

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

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by