itaVA_example_tracked_listener.m 609 Bytes
Newer Older
1 2 3 4
%% itaVA tracked listener example code
% This assumes you already have set up a virtual scene without listener

% Create itaVA and connect
5
va = itaVA( 'localhost' );
6

7 8
% Create a sound receiver
L = va.create_sound_receiver( 'itaVA_Tracked_Listener' );
9

10
% OptiTrack tracker connection and sound receiver updates
11 12 13 14 15
va.set_tracked_sound_receiver( L ) % For virtual scene / rendering
va.set_tracked_real_world_sound_receiver( L ) % For CTC reproductions
va.connect_tracker
pause( 12 ) % Observe how you can move the virtual sound receiver
va.disconnect_tracker
16 17

% Remove listener again
18
va.delete_sound_receiver( L )