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

22 views (last 30 days)
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

Answers (1)

Stephen23
Stephen23 on 11 Sep 2021
Edited: Stephen23 on 11 Sep 2021
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 Comments
Stephen23
Stephen23 on 12 Sep 2021
"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 on 12 Sep 2021
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.

Sign in to comment.

Categories

Find more on Audio I/O and Waveform Generation in Help Center and File Exchange

Products


Release

R2020b

Community Treasure Hunt

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

Start Hunting!