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
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Package Registry
Container Registry
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
Marco Berzborn
toolbox
Commits
bd3313b1
Commit
bd3313b1
authored
Nov 28, 2016
by
Jan-Gerrit Richter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changes to listeningtest stimulus
parent
f9ec8ae5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
73 additions
and
25 deletions
+73
-25
applications/ListeningTests/javaGUI/itaListeningTestStimulus.m
...cations/ListeningTests/javaGUI/itaListeningTestStimulus.m
+73
-25
No files found.
applications/ListeningTests/javaGUI/itaListeningTestStimulus.m
View file @
bd3313b1
...
...
@@ -48,7 +48,6 @@ classdef itaListeningTestStimulus
mHRTF
;
mHeadphoneEquilization
;
mStimulus
;
hrtfmerge
;
end
%% methods
...
...
@@ -96,7 +95,7 @@ classdef itaListeningTestStimulus
% targetCoord.r = 1;
% index = coords.findnearest(targetCoord);
% HRTF = this.mHRTF(ceil(index/2));
hrtf
=
this
.
hrtfmerge
.
findnearestHRTF
(
elevation
,
azimuth
);
hrtf
=
this
.
mHRTF
.
findnearestHRTF
(
elevation
,
azimuth
);
HRTF
=
hrtf
.
itaHRTF2itaAudio
;
end
...
...
@@ -114,19 +113,37 @@ classdef itaListeningTestStimulus
result
=
this
.
HRTFFile
;
end
function
this
=
set
.
HRTFFile
(
this
,
value
)
this
.
HRTFFile
=
value
;
if
isa
(
value
,
'itaAudio'
)
this
.
HRTFFile
=
''
;
this
.
mHRTF
=
itaHRTF
(
merge
(
value
));
return
end
if
isa
(
value
,
'itaHRTF'
)
this
.
HRTFFile
=
''
;
this
.
mHRTF
=
value
;
return
end
if
ischar
(
value
)
try
this
.
HRTFFile
=
value
;
% load the HRTF data
HRTF
=
ita_read
(
value
);
% TODO: normalization
% mergeHRTF = merge(HRTF);
% maxValue = max(max(abs(mergeHRTF.freqData)));
% for index = 1:length(HRTF)
% HRTF(index).freqData = HRTF(index).freqData./maxValue;
% % HRTF(index).signalType = 'energy';
% end
this
.
mHRTF
=
HRTF
;
this
.
hrtfmerge
=
itaHRTF
(
merge
(
this
.
mHRTF
));
HRTF
=
ita_read
(
value
);
catch
e
end
return
end
error
(
'Not a valid type'
);
end
...
...
@@ -134,13 +151,27 @@ classdef itaListeningTestStimulus
result
=
this
.
StimulusFile
;
end
function
this
=
set
.
StimulusFile
(
this
,
value
)
this
.
StimulusFile
=
value
;
% read the simulus file
this
.
mStimulus
=
ita_read
(
value
);
if
isa
(
value
,
'itaAudio'
)
this
.
StimulusFile
=
''
;
this
.
mStimulus
=
value
;
return
end
% normalize
% this.mStimulus.timeData = this.mStimulus.timeData./max(abs(this.mStimulus.timeData));
if
ischar
(
value
)
try
this
.
StimulusFile
=
value
;
this
.
mStimulus
=
ita_read
(
value
);
catch
e
end
return
end
error
(
'Not a valid type'
);
end
...
...
@@ -148,13 +179,30 @@ classdef itaListeningTestStimulus
result
=
this
.
HeadphoneEquilizationFile
;
end
function
this
=
set
.
HeadphoneEquilizationFile
(
this
,
value
)
this
.
HeadphoneEquilizationFile
=
value
;
if
isa
(
value
,
'itaAudio'
)
this
.
HeadphoneEquilizationFile
=
''
;
this
.
mHeadphoneEquilization
=
value
;
return
end
if
ischar
(
value
)
try
this
.
HeadphoneEquilizationFile
=
value
;
this
.
mHeadphoneEquilization
=
ita_read
(
value
);
catch
e
end
return
end
error
(
'Not a valid type'
);
% read the file
headphoneEquilization
=
ita_read
(
value
);
% TODO: normalization
%headphoneEquilization.freqData = headphoneEquilization.freqData./max(max(abs(headphoneEquilization.freqData)));
this
.
mHeadphoneEquilization
=
headphoneEquilization
;
end
end
end
\ No newline at end of file
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