Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
toolbox
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
13
Issues
13
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
4
Merge Requests
4
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Institute of Technical Acoustics (ITA)
toolbox
Commits
227f99b5
Commit
227f99b5
authored
Nov 23, 2017
by
Jan-Gerrit Richter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changed itaHRTF.ITD again to work better for open source HRTF
parent
4c5a7254
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
applications/Binaural-HRTF/HRTF_class/@itaHRTF/itaHRTF.m
applications/Binaural-HRTF/HRTF_class/@itaHRTF/itaHRTF.m
+3
-3
No files found.
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
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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