Why does .m4a audio file (imported via audioread) get stored in workspace with two data series/data columns instead of just one?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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
0 comentarios
Respuestas (1)
Stephen23
el 11 de Sept. de 2021
Editada: Stephen23
el 11 de Sept. de 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 comentarios
Stephen23
el 12 de Sept. de 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
el 12 de Sept. de 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.
Ver también
Categorías
Más información sobre Measurements and Spatial Audio en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!