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
12
Issues
12
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
5e67c778
Commit
5e67c778
authored
Oct 04, 2018
by
Florian Pausch
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://git.rwth-aachen.de/ita/toolbox
parents
37563387
b164de4d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
136 additions
and
84 deletions
+136
-84
applications/Binaural-HRTF/HRTFarc/ita_HRTFarc_measurementScript.m
...ons/Binaural-HRTF/HRTFarc/ita_HRTFarc_measurementScript.m
+62
-84
applications/Binaural-HRTF/HRTFarc/ita_HRTFarc_measurementScript_continuous.m
...l-HRTF/HRTFarc/ita_HRTFarc_measurementScript_continuous.m
+74
-0
No files found.
applications/Binaural-HRTF/HRTFarc/ita_HRTFarc_measurementScript.m
View file @
5e67c778
%% Init
% Before you start to measure the TFs of the HRTF, please make sure that:
% 0. set ita_preferences: playing/recording device: ASIO Hammerfall
% connect the first channel output to the first channel input
%% calibrate
ms_calibrate
=
itaMSTF
;
ms_calibrate
.
inputChannels
=
11
;
ms_calibrate
.
outputChannels
=
19
;
ms_calibrate
.
run_latency
;
latency
=
ms_calibrate
.
latencysamples
;
%%
% MovtecCOM Port: COM3
% midi output device: multiface midi
% 1. turntable is runnig
% 2. you change the sensitivity of the microphones with ita_robocontrol
% 3. you created a itaEimar object. This object has to be reseted for each
% measurement
% 4. load interleaved sweep
%ita_robocontrol('-20dB','Norm','0dBu')
HRTF_Eimar
=
itaEimar
;
outCh
=
19
:
1
:
82
;
inCh
=
11
:
12
;
% inCh = 11:14; %flute
% fluet 75mm and 200mm
outAmp
=
35
;
freqRange
=
[
200
22050
];
latency
=
619
;
iMS_HRTF
=
itaMSTFinterleaved
;
% please close it...
iMS_HRTF
.
inputChannels
=
inCh
;
iMS_HRTF
.
outputChannels
=
outCh
;
iMS_HRTF
.
freqRange
=
freqRange
;
iMS_HRTF
.
latencysamples
=
latency
;
iMS_HRTF
.
outputamplification
=
outAmp
;
iMS_HRTF
.
optimize
;
iMS_HRTF
.
skipCrop
=
1
;
% %% Old interleaved
phiRes
=
2.5
;
coord
=
ita_generateSampling_equiangular
(
phiRes
,
1
);
% create coordinates
coord_cut
=
coord
.
n
(
coord
.
theta_deg
==
90
);
coord_cut
=
coord_cut
.
n
(
coord_cut
.
phi_deg
<=
180
);
% this prevents that the turntable move to every single direction%
%pause(30);
% coord_cut = coord_cut.n(1);
HRTF_Eimar
.
measurementPositions
=
coord_cut
;
HRTF_Eimar
.
waitBeforeMeasurement
=
1
;
HRTF_Eimar
.
measurementSetup
=
iMS_HRTF
;
HRTF_Eimar
.
doSorting
=
false
;
%% Teller rotieren und Kamera
% Camera
% IP http://137.226.61.17/
% benutzername: itacam
HRTF_Eimar
.
reset
HRTF_Eimar
.
reference
;
HRTF_Eimar
.
move_turntable
(
90
)
%% Init/ Reset Turntable
% dataPath = [datestr(now,'yyyymmmmdd_HHMM') 'reference_' num2str(phiRes) 'degree_KE3'];
dataPath
=
[
datestr
(
now
,
'yyyymmmmdd_HHMM'
)
'Jan'
num2str
(
phiRes
)];
HRTF_Eimar
.
dataPath
=
dataPath
;
HRTF_Eimar
.
reset
HRTF_Eimar
.
reference
;
disp
(
'...................................................................'
)
disp
(
'Reference position reached!'
)
disp
(
'...................................................................'
)
%% Run measurement with Eimar
tic
HRTF_Eimar
.
run
t
=
toc
;
disp
(
'...................................................................'
)
disp
([
'Total time: '
num2str
(
round
(
t
/
60
*
100
)/
100
)])
disp
(
'...................................................................'
)
% run postprocessing
if
(
iMS_HRTF
.
skipCrop
==
1
)
ita_HRTFarc_cropMeasurementData
(
iMS_HRTF
,
dataPath
);
function
ita_HRTFarc_measurementScript
(
varargin
)
%ita_HRTFarc_measurementScript - +++ example of continuous measurement with the new HRTFarc +++
%
% This is an example of a step-wise measurement. Only use this with the
% turntable and subject rotation
%
% Reference page in Help browser
% <a href="matlab:doc test">doc test</a>
% <ITA-Toolbox>
% This file is part of the ITA-Toolbox. Some rights reserved.
% You can find the license for this m-file in the license.txt file in the ITA-Toolbox folder.
% </ITA-Toolbox>
% Author: Jan-Gerrit Richter -- Email: jri@akustik.rwth-aachen.de
% Created: 04-Oct-2018
% set this to 1 if you want to measure the system latency
options
.
measureLatency
=
0
;
% init the motor object
iMS
=
test_itaEimarMotorControl
;
% init the measurement object
ms
=
itaMSTFinterleaved
;
if
options
.
measureLatency
==
0
ms
.
latencysamples
=
629
;
else
ms
.
inputChannels
=
11
;
ms
.
outputChannels
=
20
;
input
(
'Connect the amp to ch 11'
)
ms
.
run_latency
;
input
(
'Disconnect the amp'
)
end
test_rbo_HRTF_meas_peakDetection
(
dataPath
)
ms
.
outputChannels
=
(
1
:
64
)
+
18
;
% for continuous measurement, three inputs are required, left right and the
% switch
ms
.
inputChannels
=
[
11
12
13
];
%define a freq range
ms
.
freqRange
=
[
500
22050
];
ms
.
optimize
ms
.
twait
=
0.03
;
coords
=
ita_generateSampling_equiangular
(
5
,
5
);
coords_cut
=
coords
.
n
(
coords
.
theta_deg
==
90
);
iMS
.
measurementPositions
=
coords_cut
;
saveName
=
'test'
;
iMS
.
dataPath
=
saveName
;
iMS
.
reference
;
iMS
.
run
;
% always leave the turntable in reference position
iMS
.
reference
end
\ No newline at end of file
applications/Binaural-HRTF/HRTFarc/ita_HRTFarc_measurementScript_continuous.m
0 → 100755
View file @
5e67c778
function
ita_HRTFarc_measurementScript_continuous
(
varargin
)
%ita_HRTFarc_measurementScript_continuous - +++ example of continuous measurement with the new HRTFarc +++
%
% Reference page in Help browser
% <a href="matlab:doc test">doc test</a>
% <ITA-Toolbox>
% This file is part of the ITA-Toolbox. Some rights reserved.
% You can find the license for this m-file in the license.txt file in the ITA-Toolbox folder.
% </ITA-Toolbox>
% Author: Jan-Gerrit Richter -- Email: jri@akustik.rwth-aachen.de
% Created: 04-Oct-2018
% set this to 1 if you want to measure the system latency
options
.
measureLatency
=
0
;
% init the motor object
iMS
=
test_itaEimarMotorControl
;
% init the measurement object
ms
=
itaMSTFinterleaved
;
if
options
.
measureLatency
==
0
ms
.
latencysamples
=
629
;
else
ms
.
inputChannels
=
11
;
ms
.
outputChannels
=
20
;
input
(
'Connect the amp to ch 11'
)
ms
.
run_latency
;
input
(
'Disconnect the amp'
)
end
ms
.
outputChannels
=
(
1
:
64
)
+
18
;
% for continuous measurement, three inputs are required, left right and the
% switch
ms
.
inputChannels
=
[
11
12
13
];
%define a freq range
ms
.
freqRange
=
[
500
22050
];
ms
.
optimize
ms
.
twait
=
0.03
;
% the number of repetitions defines the rotation speed
% 64 is ~ 3 minutes
numRepetitions
=
64
;
ms
.
repetitions
=
numRepetitions
;
iMS
.
measurementSetup
=
ms
;
% this prepares the full measurement.
% it does a reference move, and moves back the arc by 45 degrees
iMS
.
prepareContinuousMeasurement
;
[
res
,
raw
]
=
iMS
.
runContinuousMeasurement
;
saveName
=
'test'
;
ita_write
(
res
,
sprintf
(
'%s_%d'
,
saveName
,
numRepetitions
))
ita_write
(
raw
,
sprintf
(
'%s_%d_raw'
,
saveName
,
numRepetitions
))
% this moves the arc back faster
iMS
.
moveTo
(
'HRTFArc'
,
20
,
'absolut'
,
true
,
'speed'
,
5
,
'wait'
,
true
);
%always leave the arc in reference position
iMS
.
reference
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