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
b9b1eb62
Commit
b9b1eb62
authored
Apr 03, 2018
by
Dipl.-Ing. Jonas Stienen
Browse files
Starting with HATO test script for VA
parent
87bfd7f1
Changes
2
Hide whitespace changes
Inline
Side-by-side
applications/VirtualAcoustics/VA/itaVA_example_tracked_hato_listener.m
0 → 100644
View file @
b9b1eb62
%% itaVA tracked head-above-torso listener example code
% Create itaVA and connect
va
=
itaVA
(
'localhost'
);
va
.
reset
()
va
.
set_output_gain
(
.
25
)
% Create a signal source and start playback
X
=
va
.
create_signal_source_buffer_from_file
(
'$(DemoSound)'
);
va
.
set_signal_source_buffer_playback_action
(
X
,
'play'
);
va
.
set_signal_source_buffer_looping
(
X
,
true
);
% Create a virtual sound source and set a position
S
=
va
.
create_sound_source
(
'itaVA_Source'
);
va
.
set_sound_source_position
(
S
,
[
0
1.7
-
2
]
);
va
.
set_sound_source_signal_source
(
S
,
X
);
% Create a sound receiver with HATO (actually OTAH) HRTF
L
=
va
.
create_sound_receiver
(
'itaVA_Tracked_HATO_Listener'
);
H
=
va
.
create_directivity
(
'FABIAN_OTAH_5x5x5_256_44100Hz.v17.ir.daff'
);
va
.
set_sound_receiver_directivity
(
L
,
H
);
% OptiTrack tracker connection and sound receiver updates
% ... for rendering modules
va
.
set_tracked_sound_receiver
(
L
);
va
.
set_tracked_sound_receiver_head_rigid_body_index
(
1
);
va
.
set_tracked_sound_receiver_torso_rigid_body_index
(
2
);
% ... for reproduction modules
va
.
set_tracked_real_world_sound_receiver
(
L
);
va
.
setset_tracked_real_world_sound_receiver_head_rigid_body_index
(
2
);
% Start!
va
.
connect_tracker
% pause( 12 )
% va.disconnect_tracker
applications/VirtualAcoustics/VA/itaVA_example_tracked_listener.m
View file @
b9b1eb62
...
...
@@ -7,7 +7,7 @@ va = itaVA( 'localhost' );
% Create a sound receiver
L
=
va
.
create_sound_receiver
(
'itaVA_Tracked_Listener'
);
% OptiTrack tracker conne
e
ction and sound receiver updates
% OptiTrack tracker connection and sound receiver updates
va
.
set_tracked_sound_receiver
(
L
)
% For virtual scene / rendering
va
.
set_tracked_real_world_sound_receiver
(
L
)
% For CTC reproductions
va
.
connect_tracker
...
...
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