Stereo sound doesn't behave as expected

[road,fs]=wavread('road.wav'); % loads “the long and winding road” clip
left=road(:,1);
right=road(:,2);
soundsc(left,fs) % plays left channel as mono
soundsc(right,fs) % plays right channel mono
Why the sound doesn't divided into left channel (Left ear) and right Channel (right ear) ?

댓글 수: 2

Thomas
Thomas 2012년 5월 30일
Do you mean, when you play soundsc(left,fs) it should only come from the left speaker?
chewkaisheng
chewkaisheng 2012년 5월 30일
yup:)
how to if just the sound come from the only left speaker or only the right speaker??

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

답변 (2개)

Thomas
Thomas 2012년 5월 30일

1 개 추천

MAybe you need something like this
[road,fs]=wavread('road.wav');
pad=zeros(length(road),1); % blank channel
left=[road(:,1),pad]; % add blank channel so right is silent
right=[pad,road(:,2)]; % add blank channel so left is silent
soundsc(left,fs) % sound only from left
soundsc(right,fs) % sound only from right

댓글 수: 5

chewkaisheng
chewkaisheng 2012년 5월 30일
Thanks for reply,
I had tried, let's say
[road,fs]=wavread('road.wav');
pad=zeros(length(road),1); % blank channel
left=[road(:,1),pad]; % add blank channel so right is silent
soundsc(left,fs) % sound only from left
but in the right speaker still having a sound but the volume is lower than left
Thomas
Thomas 2012년 5월 30일
I just tested this and it works as it should.. maybe an issue with your sound card or connection to the speaker.. The right channel for me is completely blank. Make sure you have connected your speakers with a stereo cable (T R S)..
Walter Roberson
Walter Roberson 2012년 5월 30일
Cheap sound reproduction systems often have problems with signal separation -- the signals leak into the other channels. This is not a problem with MATLAB, this is a problem with the equipment used to play the sound (or possibly with the cables, especially if your cables are single strand.)
Walter Roberson
Walter Roberson 2012년 5월 30일
http://www.answerbag.com/q_view/2147756
chewkaisheng
chewkaisheng 2012년 5월 31일
Thomas Anthony and Walter Roberson
Thank you so much !!!! :)
have a nice day!

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

Walter Roberson
Walter Roberson 2012년 5월 30일

0 개 추천

When you soundsc() a single column of data, it is sent to both channels. Notice there is no possibility to select whether you are sending to left channel or to right channel when you soundsc()
hint:
soundsc( [left, zeros(size(left))], fs)

댓글 수: 1

chewkaisheng
chewkaisheng 2012년 5월 30일
so, is there any possible suing other command to send it to left or right only?
Thanks!!

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

질문:

2012년 5월 30일

Community Treasure Hunt

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

Start Hunting!

Translated by