Commit 5f6303ba authored by Daniel Filbert's avatar Daniel Filbert

WIP fixing problems with DAFF dataset for FABIAN

parent 383c1b1e
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' );
......
......@@ -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 ) );
......
......@@ -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 = [-40 40];
export_properties.hatorange = [-50 50];
%% Set up metadata
additional_metadata = daffv17_add_metadata( [], 'hato', 'BOOL', true );
......
h = DAFFv17( '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_left_raw, ~ ] = DAFFv17( 'getNearestNeighbourRecord', h , 'object', 0, 0 );
[ hrir_front_raw, ~ ] = h.get_nearest_neighbour_record( 0, 0 );
% for i = 1:17
% a = 2*i - 1;
% b = 2*i;
% hrir_left_hato_0 = itaAudio;
% hrir_left_hato_0.timeData = hrir_left_raw( a:b, : )';
% hrir_left_hato_0.timeData = hrir_front_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_left_raw( 1:2, : )';
hrir_left_hato_0.timeData = hrir_front_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_left_raw( 3:4, : )';
hrir_left_hato_320.timeData = hrir_front_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_left_raw( 33:34, : )';
hrir_left_hato_40.timeData = hrir_front_raw( 33:34, : )';
binaural_demosound_hato_40 = ita_convolve( sound_sample, hrir_left_hato_40 );
binaural_demosound_hato_40.play
% [ hrir_left_raw, ~ ] = DAFFv17( 'getNearestNeighbourRecord', h , 'object', 90, -40 );
% [ hrir_front_raw, ~ ] = DAFFv17( 'getNearestNeighbourRecord', h , 'object', 90, -40 );
%
% hrir_left_hato_0 = itaAudio;
% hrir_left_hato_0.timeData = hrir_left_raw( 1:2, : )';
% hrir_left_hato_0.timeData = Shrir_front_raw( 1:2, : )';
%
% binaural_demosound = ita_convolve( sound_sample, hrir_left_hato_0 );
% binaural_demosound.play
%
%
% [ hrir_left_raw, ~ ] = DAFFv17( 'getNearestNeighbourRecord', h , 'object', 90, 40 );
% [ hrir_front_raw, ~ ] = DAFFv17( 'getNearestNeighbourRecord', h , 'object', 90, 40 );
%
% hrir_left_hato_0 = itaAudio;
% hrir_left_hato_0.timeData = hrir_left_raw( 1:2, : )';
% hrir_left_hato_0.timeData = hrir_front_raw( 1:2, : )';
%
% binaural_demosound = ita_convolve( sound_sample, hrir_left_hato_0 );
% binaural_demosound.play
% for i = 1:4
% [ hrir_left_raw, ~ ] = DAFFv17( 'getNearestNeighbourRecord', h , 'object', 90, (-50 + i*10) );
% [ hrir_front_raw, ~ ] = DAFFv17( 'getNearestNeighbourRecord', h , 'object', 90, (-50 + i*10) );
%
% hrir_left_hato_0 = itaAudio;
% hrir_left_hato_0.timeData = hrir_left_raw( 1:2, : )';
% hrir_left_hato_0.timeData = hrir_front_raw( 1:2, : )';
%
% binaural_demosound = ita_convolve( sound_sample, hrir_left_hato_0 );
% binaural_demosound.play
% end
%
% for i = 1:4
% [ hrir_left_raw, ~ ] = DAFFv17( 'getNearestNeighbourRecord', h , 'object', 90, i*10 );
% [ hrir_front_raw, ~ ] = DAFFv17( 'getNearestNeighbourRecord', h , 'object', 90, i*10 );
%
% hrir_left_hato_0 = itaAudio;
% hrir_left_hato_0.timeData = hrir_left_raw( 1:2, : )';
% hrir_left_hato_0.timeData = hrir_front_raw( 1:2, : )';
%
% binaural_demosound = ita_convolve( sound_sample, hrir_left_hato_0 );
% binaural_demosound.play
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment