DSPRelated.com
Forums

How make 3d sound in matlab??

Started by robs...@yahoo.com February 10, 2010
Hello all

i trying make 3d sound in matlab (like virtual hair cut), and i think that is depend on amplitude(far,near) and shift(left, right) of orginal signal

i success in part of amplitude, but not in shift

the adea is one channel far become near and other near become far (like person who talk and move from left to right)

this is the code i write it (one channel record), no error but unacceptable
[dd,fs]=mp3read('mama.mp3',[0 100],1,1);

s=0;
a=1;
m=0;
n=0;

[dd,fss]=mp3read('mama.mp3',[(s+j)*fs (a+j)*fs],1,1);
ch1:,1);
ch2=ch1*10;

res2=(ch1/40);
res3=ch2*.0008;

for i=0:1:30
j=1;
[dd,fss]=mp3read('mama.mp3',[(s+j)*fs (a+j)*fs],1,1);
ch1:,1);
ch2=ch1*5;
d1=ch1/20;

m=m+0.33;
s=s+1;
a=a+1;

res2=vertcat(res2,d1*m);
d2=ch2;
n=n+0.0008;

res3=vertcat(res3,d2*n);
end
%res(:,1)=res2;

%res(:,2)=res2;
ress(:,1)=res2;
ress(:,2)=res3;
wavplay(ress,fs);
Thanx