Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Institute of Technical Acoustics (ITA)
toolbox
Commits
227f99b5
Commit
227f99b5
authored
Nov 23, 2017
by
Jan-Gerrit Richter
Browse files
changed itaHRTF.ITD again to work better for open source HRTF
parent
4c5a7254
Changes
1
Hide whitespace changes
Inline
Side-by-side
applications/Binaural-HRTF/HRTF_class/@itaHRTF/itaHRTF.m
View file @
227f99b5
...
...
@@ -917,11 +917,11 @@ classdef itaHRTF < itaAudio
ITD
=
phasenDiff
.
/(
2
*
pi
*
repmat
(
thisC
.
freqVector
,
1
,
size
(
phase1
,
2
)));
else
% averaged
usedBins
=
thisC
.
freq2index
(
sArgs
.
filter
(
1
)):
thisC
.
freq2index
(
sArgs
.
filter
(
2
));
phase
=
unwrap
(
angle
(
thisC
.
freqData
(
2
:
end
,:)));
phase
=
unwrap
(
angle
(
thisC
.
freqData
(
3
:
end
,:)));
freqVector
=
thisC
.
freqVector
;
t0_freq
=
bsxfun
(
@
rdivide
,
phase
,
2
*
pi
*
freqVector
(
2
:
end
));
t0_freq
=
bsxfun
(
@
rdivide
,
phase
,
2
*
pi
*
freqVector
(
3
:
end
));
t0_freq
=
t0_freq
(
~
isnan
(
t0_freq
(:,
1
)),:);
t0_mean
=
mean
(
t0_freq
(
usedBins
,:));
%mean is smoother than max; lower freq smooths also the result
t0_mean
=
mean
(
t0_freq
(
3
+
usedBins
,:));
%mean is smoother than max; lower freq smooths also the result
ITD
=
t0_mean
(
thisC
.
EarSide
==
'L'
)
-
t0_mean
(
thisC
.
EarSide
==
'R'
);
end
case
'xcorr'
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment