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
44c03868
Commit
44c03868
authored
Jan 09, 2018
by
Markus Mueller-Trapet
Browse files
use smoothing again, fix units and slight change for output normalization
parent
3b760bb0
Changes
1
Hide whitespace changes
Inline
Side-by-side
applications/Binaural-HRTF/HpTF_class/ita_headphone_equalization.m
View file @
44c03868
...
...
@@ -7,6 +7,7 @@ function output = ita_headphone_equalization(HPTF,type)
% </ITA-Toolbox>
output
=
HPTF
(
1
,
1
);
output
.
channelUnits
(:)
=
{
''
};
for
cdx
=
1
:
HPTF
(
1
,
1
)
.
nChannels
hp
=
merge
(
HPTF
.
ch
(
cdx
));
...
...
@@ -38,7 +39,7 @@ for cdx = 1:HPTF(1,1).nChannels
R
.
freqData
=
aux
;
% do smoothing
%
R = ita_smooth(R,'LogFreqOctave1',1/6,'Abs');
R
=
ita_smooth
(
R
,
'LogFreqOctave1'
,
1
/
6
,
'Abs'
);
R
=
ita_invert_spk_regularization
(
R
,[
0
18000
],
'beta'
,
.
01
);
% minimum phase
...
...
@@ -63,14 +64,11 @@ for cdx = 1:HPTF(1,1).nChannels
% H = ita_time_window(H,[2^12 2^13],'samples');
% H = ita_time_window(H,[0.1 0.2],'time','dc',true);
H
=
ita_time_window
(
H
,[
2
^
9
2
^
10
],
'samples'
);
H
.
channelUnits
=
{
''
};
% It is necessary to correct the overall level of the filter
% we can either guaranty no gain
% H = H/max(abs(H.freqData));
% spl = ita_spk2level(H,3,'averaged');
%
% H = H/mean(spl.data);
output
.
freqData
(:,
cdx
)
=
H
.
freqData
;
...
...
@@ -79,4 +77,4 @@ end
% or guaranty that the average level of the signal is not altered
% this also means that the overall loudness of the signal will not be
% considerably altered.
% output = output/norm(output.rms);
\ No newline at end of file
output
=
output
/
mean
(
output
.
rms
);
\ No newline at end of file
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