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
5f6303ba
Commit
5f6303ba
authored
Mar 28, 2018
by
Daniel Filbert
Browse files
WIP fixing problems with DAFF dataset for FABIAN
parent
383c1b1e
Changes
4
Hide whitespace changes
Inline
Side-by-side
applications/VirtualAcoustics/openDAFF/OpenDAFFv1.7/hrtfs/TUB/daffv17_convert_from_aktools.m
View file @
5f6303ba
function [] = daffv17_convert_from_aktools( target_file_path, export_properties, additional_metadata )
export_properties.samplerate = 44100;
export_properties.numsamples = 256;
export_properties.numchannels = 2 * ceil( ( export_properties.hatorange( 2 ) - export_properties.hatorange( 1 ) ) / export_properties.hatores + 1 );
combined_metadata = daffv17_add_metadata( additional_metadata, 'Converter script', 'String', 'daffv17_convert_from_aktools.m' );
...
...
applications/VirtualAcoustics/openDAFF/OpenDAFFv1.7/hrtfs/TUB/dfAKtools.m
View file @
5f6303ba
...
...
@@ -11,12 +11,18 @@ hato_negative_range = config.hatorange( 1 ):config.hatores:-config.hatores;
hato_positive_range
=
config
.
hatores
:
config
.
hatores
:
config
.
hatorange
(
2
);
hato
=
[
0
hato_negative_range
hato_positive_range
];
[
l
,
r
]
=
AKhrirInterpolation
(
alpha
,
beta
-
90
,
hato
);
l
=
l
'
;
r
=
r
'
;
data
=
zeros
(
config
.
numchannels
,
config
.
numsamples
);
for
n
=
1
:(
config
.
numchannels
/
2
)
[
l
,
r
]
=
AKhrirInterpolation
(
alpha
+
hato
(
n
),
beta
-
90
,
hato
(
n
)
);
% Interleave for DAFF (odd = left, even = right)
data
(
2
*
n
-
1
,
:
)
=
l
'
;
data
(
2
*
n
,
:
)
=
r
'
;
end
% Interleave for DAFF (odd = left, even = right)
data
=
reshape
(
[
l
(:)
r
(:)
]
'
,
2
*
size
(
l
,
1
),
[]
);
samplerate
=
config
.
samplerate
;
metadata
=
daffv17_add_metadata
(
[],
'AKhrirInterpolation_hato_parameter'
,
'STRING'
,
num2str
(
hato
)
);
...
...
applications/VirtualAcoustics/openDAFF/OpenDAFFv1.7/hrtfs/TUB/example_convert_FABIAN_HATO.m
View file @
5f6303ba
...
...
@@ -11,7 +11,7 @@ export_properties.alpharange = [0 360];
export_properties
.
betares
=
5
;
export_properties
.
betarange
=
[
0
180
];
export_properties
.
hatores
=
5
;
export_properties
.
hatorange
=
[
-
4
0
4
0
];
export_properties
.
hatorange
=
[
-
5
0
5
0
];
%% Set up metadata
additional_metadata
=
daffv17_add_metadata
(
[],
'hato'
,
'BOOL'
,
true
);
...
...
applications/VirtualAcoustics/openDAFF/OpenDAFFv1.7/hrtfs/TUB/test_FABIAN_HATO_DAFF.m
View file @
5f6303ba
h
=
DAFF
v17
(
'open'
,
'FABIAN_HATO_5x5x5_256_44100Hz.v17.ir.daff'
);
h
=
DAFF
(
'FABIAN_HATO_5x5x5_256_44100Hz.v17.ir.daff'
);
sound_sample
=
ita_read
(
'Bongos.wav'
);
[
hrir_
lef
t_raw
,
~
]
=
DAFFv17
(
'
get
N
earest
N
eighbour
R
ecord
'
,
h
,
'object'
,
0
,
0
);
[
hrir_
fron
t_raw
,
~
]
=
h
.
get
_n
earest
_n
eighbour
_r
ecord
(
0
,
0
);
% for i = 1:17
% a = 2*i - 1;
% b = 2*i;
% hrir_left_hato_0 = itaAudio;
% hrir_left_hato_0.timeData = hrir_
lef
t_raw( a:b, : )';
% hrir_left_hato_0.timeData = hrir_
fron
t_raw( a:b, : )';
%
% binaural_demosound = ita_convolve( sound_sample, hrir_left_hato_0 );
% binaural_demosound.play
...
...
@@ -14,60 +14,60 @@ sound_sample = ita_read('Bongos.wav');
hrir_left_hato_0
=
itaAudio
;
hrir_left_hato_0
.
timeData
=
hrir_
lef
t_raw
(
1
:
2
,
:
)
'
;
hrir_left_hato_0
.
timeData
=
hrir_
fron
t_raw
(
1
:
2
,
:
)
'
;
binaural_demosound_hato_0
=
ita_convolve
(
sound_sample
,
hrir_left_hato_0
);
binaural_demosound_hato_0
.
play
hrir_left_hato_320
=
itaAudio
;
hrir_left_hato_320
.
timeData
=
hrir_
lef
t_raw
(
3
:
4
,
:
)
'
;
hrir_left_hato_320
.
timeData
=
hrir_
fron
t_raw
(
3
:
4
,
:
)
'
;
binaural_demosound_hato_320
=
ita_convolve
(
sound_sample
,
hrir_left_hato_320
);
binaural_demosound_hato_320
.
play
hrir_left_hato_40
=
itaAudio
;
hrir_left_hato_40
.
timeData
=
hrir_
lef
t_raw
(
33
:
34
,
:
)
'
;
hrir_left_hato_40
.
timeData
=
hrir_
fron
t_raw
(
33
:
34
,
:
)
'
;
binaural_demosound_hato_40
=
ita_convolve
(
sound_sample
,
hrir_left_hato_40
);
binaural_demosound_hato_40
.
play
% [ hrir_
lef
t_raw, ~ ] = DAFFv17( 'getNearestNeighbourRecord', h , 'object', 90, -40 );
% [ hrir_
fron
t_raw, ~ ] = DAFFv17( 'getNearestNeighbourRecord', h , 'object', 90, -40 );
%
% hrir_left_hato_0 = itaAudio;
% hrir_left_hato_0.timeData = hrir_
lef
t_raw( 1:2, : )';
% hrir_left_hato_0.timeData =
S
hrir_
fron
t_raw( 1:2, : )';
%
% binaural_demosound = ita_convolve( sound_sample, hrir_left_hato_0 );
% binaural_demosound.play
%
%
% [ hrir_
lef
t_raw, ~ ] = DAFFv17( 'getNearestNeighbourRecord', h , 'object', 90, 40 );
% [ hrir_
fron
t_raw, ~ ] = DAFFv17( 'getNearestNeighbourRecord', h , 'object', 90, 40 );
%
% hrir_left_hato_0 = itaAudio;
% hrir_left_hato_0.timeData = hrir_
lef
t_raw( 1:2, : )';
% hrir_left_hato_0.timeData = hrir_
fron
t_raw( 1:2, : )';
%
% binaural_demosound = ita_convolve( sound_sample, hrir_left_hato_0 );
% binaural_demosound.play
% for i = 1:4
% [ hrir_
lef
t_raw, ~ ] = DAFFv17( 'getNearestNeighbourRecord', h , 'object', 90, (-50 + i*10) );
% [ hrir_
fron
t_raw, ~ ] = DAFFv17( 'getNearestNeighbourRecord', h , 'object', 90, (-50 + i*10) );
%
% hrir_left_hato_0 = itaAudio;
% hrir_left_hato_0.timeData = hrir_
lef
t_raw( 1:2, : )';
% hrir_left_hato_0.timeData = hrir_
fron
t_raw( 1:2, : )';
%
% binaural_demosound = ita_convolve( sound_sample, hrir_left_hato_0 );
% binaural_demosound.play
% end
%
% for i = 1:4
% [ hrir_
lef
t_raw, ~ ] = DAFFv17( 'getNearestNeighbourRecord', h , 'object', 90, i*10 );
% [ hrir_
fron
t_raw, ~ ] = DAFFv17( 'getNearestNeighbourRecord', h , 'object', 90, i*10 );
%
% hrir_left_hato_0 = itaAudio;
% hrir_left_hato_0.timeData = hrir_
lef
t_raw( 1:2, : )';
% hrir_left_hato_0.timeData = hrir_
fron
t_raw( 1:2, : )';
%
% binaural_demosound = ita_convolve( sound_sample, hrir_left_hato_0 );
% binaural_demosound.play
...
...
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