WIP

parent b2d9512c
...@@ -13,7 +13,7 @@ if( NOT DEFINED ITA_VAMATLAB_VERSION_MAJOR ) ...@@ -13,7 +13,7 @@ if( NOT DEFINED ITA_VAMATLAB_VERSION_MAJOR )
endif( NOT DEFINED ITA_VAMATLAB_VERSION_MAJOR ) endif( NOT DEFINED ITA_VAMATLAB_VERSION_MAJOR )
if( NOT DEFINED ITA_VAMATLAB_VERSION_MINOR ) if( NOT DEFINED ITA_VAMATLAB_VERSION_MINOR )
set( ITA_VAMATLAB_VERSION_MINOR "a" CACHE STRING "VAMatlab version minor (usually a,b,c ...)" ) set( ITA_VAMATLAB_VERSION_MINOR "b" CACHE STRING "VAMatlab version minor (usually a,b,c ...)" )
endif( NOT DEFINED ITA_VAMATLAB_VERSION_MINOR ) endif( NOT DEFINED ITA_VAMATLAB_VERSION_MINOR )
if( NOT DEFINED ITA_VAMATLAB_SHOW_BANNER ) if( NOT DEFINED ITA_VAMATLAB_SHOW_BANNER )
......
...@@ -4,6 +4,9 @@ ...@@ -4,6 +4,9 @@
% the user. Also the rendering module(s) have to be set to record the output % the user. Also the rendering module(s) have to be set to record the output
% to hard drive. % to hard drive.
buffer_size = 64;
sampling_rate = 44100;
%% Connect and set up simple scene %% Connect and set up simple scene
va = itaVA( 'localhost' ); va = itaVA( 'localhost' );
...@@ -22,17 +25,17 @@ va.set_sound_source_signal_source( S, X ) ...@@ -22,17 +25,17 @@ va.set_sound_source_signal_source( S, X )
%% Example for a synchronized scene update & audio processing simulation/auralization %% Example for a synchronized scene update & audio processing simulation/auralization
timestep = 128 / 44100; % here: depends on block size and sample rate timestep = buffer_size / sampling_rate; % here: depends on block size and sample rate
manual_clock = 0; manual_clock = 0;
va.set_core_clock( 0 ); va.set_core_clock( 0 );
spatialstep = 0.01; spatialstep = 0.005;
disp( [ 'Resulting sound source speed: ' num2str( spatialstep / timestep ) ' m/s' ] ) disp( [ 'Resulting sound source speed: ' num2str( spatialstep / timestep ) ' m/s' ] )
numsteps = 3400; numsteps = 6000;
disp( [ 'Simulation result duration: ' num2str( numsteps * timestep ) ' s' ] ) disp( [ 'Simulation result duration: ' num2str( numsteps * timestep ) ' s' ] )
x = linspace( -1, 1, numsteps ) * 100; % motion from x = -100m to x = 100m x = linspace( -1, 1, numsteps ) * 60; % motion from x = -100m to x = 100m
h = waitbar( 0, 'Hold on, running auralization' ); h = waitbar( 0, 'Hold on, running auralization' );
for n = 1:length( x ) for n = 1:length( x )
...@@ -54,4 +57,4 @@ close( h ) ...@@ -54,4 +57,4 @@ close( h )
va.disconnect va.disconnect
disp( 'Stop VA to export simulation results from rendering module(s)' ) disp( '!!! Please stop VA manually to export simulation results from rendering module(s) !!!' )
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