Weird problem with "sound()" function

I'll keep it short:
1) load any .wav file you wish, for example:
[x, Fs] = audioread('test.wav');
2) play it with the sound() command like this:
sound(x, Fs);
3) It works, right?! Now try this (and yes, my 'x' is a column vector, so the stereo thing below is concatenated correctly):
sound([x, -x], Fs);
BAM!!! It doesn't output any sound at all ... WHY? I have my left channel 180 degrees out of phase with respect to the right channel, but I should STILL hear something. I know they'll tend to cancel eachother if I'm precisely in-between the speakers, but that's not why I'm not hearing anything. MATLAB won't play anything in fact, on neither of the speakers :(
So .. why?

1 件のコメント

W. Owen Brimijoin
W. Owen Brimijoin 2014 年 5 月 22 日
This is curious. I trust you have ascertained that if you play 'x' or '-x' on its own that it's audible from only a single loudspeaker? Do this to test channel two:
sound([zeros(size(x)), -x], Fs);
If your signal actually coming out of both loudspeakers, then you've got a crosstalk problem.
2) Check that your OS level system audio isn't mixing the two channels together (i.e., that you've enabled 'mono' or some kind of cross talk cancellation in the sound preferences).
3) Your audio interconnects (the physical cables) could be damaged or not plugged in properly resulting in channel bleed that in the case of 180 out-of-phase signals would severely attenuate or eliminate the summed signal.

サインインしてコメントする。

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeAudio I/O and Waveform Generation についてさらに検索

製品

質問済み:

2014 年 5 月 21 日

コメント済み:

2014 年 5 月 22 日

Community Treasure Hunt

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

Start Hunting!

Translated by