LOCALIZATION OF SOUND/TONE (3D SOUND)

14 次查看(过去 30 天)
i am currently working on 3D sound. i have employed the alogorithm and formula from c.phillps brown and richard Duda research paper. i am unable to make prominant difference between front and back discrimination of sound. also tell me some method to externalize the sound. please help me in this
  3 个评论
Walter Roberson
Walter Roberson 2011-7-26
I believe the paper is doi 10.1.1.21.8822
muhammad tariq
muhammad tariq 2011-7-28
yes the same paper....i have posted the code on this thread as well.....can u suggest some correction/addition
thanks

请先登录,再进行评论。

回答(4 个)

Daniel Shub
Daniel Shub 2011-7-27
Note to be rude, but rather pragmatic, you can't. In the absence of head movement and reverberation front-back confusions are frequent, and distance perception, somewhat related to externalization, is poor.
  4 个评论
muhammad tariq
muhammad tariq 2011-7-27
can you kindly tel me what do you mean by stong priors
Daniel Shub
Daniel Shub 2011-7-28
I mean priors as in Bayesian priors. You expect the clippers to be at the back of your head, so you hear them there. If you were to reprocess the sounds in virtual barbershop flipping the front to the back and vice versa, I bet the percept would not be as strong. The same can be said of the surround sound in movie theaters (and homes), rarely are we in the optimal position for listening, so the cues are wrong, but we hear the sounds in the correct place.

请先登录,再进行评论。


muhammad tariq
muhammad tariq 2011-7-27
编辑:Walter Roberson 2016-3-8
the code is here.in this code ITD,ILD and PINNA MODEL (fr filtering) have been implemented in order to discriminate front and back side sound/tone...but failed to achieve the required results.furthermore m unable to achieve externalization(out of head) of sound. i have made a GUI and have taken recorded audio files.i m changing the location(changing azimuth angle of arrival of sound) on GUI and observing the sound via headphones. what i want to do is when i take the sound to the back of head i should feel the sound in the headphones as coming from back side of head.i have done the work in which the direction of sound on front half side of head can be observed....but from the backside the feeling is quite weak.any help in this regard will be highly appreciated.
function [y] = hrtfsphere(a,Dk,az,elev,snd,fs)
c = 334; %Speed of sound in m/s
theta_left = -90*pi/180;
theta_right = 90*pi/180;
wo = c/a;
az = az*pi/180;
if (elev > 90)
elev = 90;
elseif (elev < -90)
elev =-90;
end
elev = elev*pi/180;
Ak = [1 5 5 5 5]; %coefficeint values for pinna model
Bk = [2 4 7 11 13];
g = [0.5 -1 .5 -0.25 0.25];
snd1 = snd(:,1);
if (size(snd,2) == 2)
snd2 = snd(:,2);
else
snd2 = snd1;
end
%implementing ear pinna filtering as FIR filter
%pinna model
Tk = cos(az/2) * Ak .* sin(Dk*(pi/2-elev)) + Bk;
coeffs = zeros(1,max(ceil(Tk))+2);
for p = 1:5
c = floor(Tk(p));
r = mod(Tk(p),c);
%finding coefficient(weights) for FIR filtr
coeffs(c) = coeffs(c) + g(p)*(1-r);
coeffs(c+1) = coeffs(c+1) + g(p)*r;
end
Tk = [1 coeffs];
snd1 = filter(Tk,1,snd1); %implementin FIR filter
snd2 = filter(Tk,1,snd2);
al = (1.05 + 0.95*cos((az-theta_left)*18/15));
ar = (1.05 + 0.95*cos((az-theta_right)*18/15));
%calculating time delay b/w the two ears
dtl = 0;
if (0 <= abs(az-theta_left) < pi/2)
dtl = -a/c*cos(az-theta_left);
elseif (pi/2 <= abs(az-theta_left)< pi)
dtl = a/c*(abs(az-theta_left)-pi/2);
end
dtl = dtl + a/c;
dtr = 0;
if (0 <= abs(az-theta_right) < pi/2)
dtr = -a/c*cos(az-theta_right);
elseif (pi/2 <= abs(az-theta_right)< pi)
dtr = a/c*(abs(az-theta_right)-pi/2);
end
dtr = dtr + a/c;
x1 = fft(snd1);
x1 = x1(1:floor(length(x1)/2))';
x2 = fft(snd2);
x2 = x2(1:floor(length(x2)/2))';
f = fs*(0:length(x1)-1)/length(x1);
w = 2*pi*f;
Hl = ( 1 + ( 1i*al*w / (2*wo))) ./ (1+1i*w/(2*wo)) .* exp(-1i*w*dtr);
Hr = ( 1 + ( 1i*ar*w / (2*wo))) ./ (1+1i*w/(2*wo)) .* exp(-1i*w*dtl);
yl = x1.*Hl;
yr = x2.*Hr;
yl(length(yl) + 1) = 0;
yl = [yl conj(fliplr(yl(2:length(yl)-1)))];
yr(length(yr) + 1) = 0;
yr = [yr conj(fliplr(yr(2:length(yr)-1)))];
y(:,1) = fliplr(ifft(yl(1:length(yl))));
y(:,2) = fliplr(ifft(yr(1:length(yr))));
y = y./(1.5*max(max(y)));
subplot(3,3,[3 6]), plot(y);
axis([0 20 -1 1]);
legend ('Left Channel / Ear' , 'Right Channel / Ear ')
title('Output Result on Channels');
xlabel('Samples');
ylabel('Amplitude');
grid on;
end

Image Analyst
Image Analyst 2011-7-27
If you're interested in visualizing sound and determining where it came from and its intensity at each location you can use an acoustic camera, such as this one: http://www.acoustic-camera.com/en/acoustic-camera-en. It produces an image of sound intensity - see the web site for examples. If you had several of those you could perhaps get a 3D volumetric image of where sound originates.
  3 个评论
Image Analyst
Image Analyst 2011-7-28
I can't help you. I know nothing about audio processing.
muhammad tariq
muhammad tariq 2011-7-28
can u who tel me anybdy who knws audio processing

请先登录,再进行评论。


jhosmar solarte
jhosmar solarte 2018-11-21
Buena noche amigo.
Será que alguien me podría regalar el código completo por favor.
  1 个评论
Walter Roberson
Walter Roberson 2018-11-21
Not likely . We are not a code writing service . If you encounter errors in your own implementation then we will help you find the problem .

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Audio I/O and Waveform Generation 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by