Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
VAMatlab
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Institute of Technical Acoustics (ITA)
VAMatlab
Commits
744436a9
Commit
744436a9
authored
7 years ago
by
Dipl.-Ing. Jonas Stienen
Browse files
Options
Downloads
Patches
Plain Diff
Removing old workaround, has been fixed now. Also elaborating on some comments
parent
15468132
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
matlab/itaVA_example_offline_simulation.m
+1
-5
1 addition, 5 deletions
matlab/itaVA_example_offline_simulation.m
matlab/itaVA_example_offline_simulation_ir.m
+3
-5
3 additions, 5 deletions
matlab/itaVA_example_offline_simulation_ir.m
with
4 additions
and
10 deletions
matlab/itaVA_example_offline_simulation.m
+
1
−
5
View file @
744436a9
...
...
@@ -24,6 +24,7 @@ va.set_sound_source_signal_source( S, X )
timestep
=
128
/
44100
;
% here: depends on block size and sample rate
manual_clock
=
0
;
va
.
set_core_clock
(
0
);
spatialstep
=
0.01
;
disp
(
[
'Resulting sound source speed: '
num2str
(
spatialstep
/
timestep
)
' m/s'
]
)
...
...
@@ -49,13 +50,8 @@ for n = 1:length( x )
waitbar
(
n
/
numsteps
)
end
close
(
h
)
% Temporary workaround
va
.
set_rendering_module_parameters
(
'MyBinauralFreeField'
,
struct
(
'prepare_manual_reset'
,
true
)
);
va
.
set_core_clock
(
0
)
va
.
disconnect
disp
(
'Stop VA to export simulation results from rendering module(s)'
)
This diff is collapsed.
Click to expand it.
matlab/itaVA_example_offline_simulation_ir.m
+
3
−
5
View file @
744436a9
...
...
@@ -37,8 +37,7 @@ x = linspace( -1, 1, numsteps ) * 5; % motion from x = -5m to x = 5m
h
=
waitbar
(
0
,
'Hold on, running auralization'
);
for
n
=
1
:
length
(
x
)
% Modify scene as you please (position has no real effect for this
% renderer)
% Modify scene as you please (position has no real effect for prototype generic path renderer)
pos
=
[
x
(
n
)
1.7
-
1
];
distance
=
sum
(
abs
(
pos
-
[
0
1.7
0
]
)
);
va
.
set_sound_source_position
(
S
,
pos
);
...
...
@@ -46,14 +45,14 @@ for n = 1:length( x )
brir
=
itaAudio
();
brir
.
timeData
=
zeros
(
1024
,
2
);
brir
.
timeData
(
1
,
1
)
=
1.0
/
distance
;
brir
.
timeData
(
1
,
2
)
=
0.5
/
distance
;
% just make inbalanced for fun
brir
.
timeData
(
1
,
2
)
=
0.5
/
distance
;
% just make inbalanced
and distance dependent
for fun
path_update
=
struct
();
path_update
.
source
=
S
;
path_update
.
receiver
=
L
;
path_update
.
ch1
=
brir
.
timeData
(
:,
1
);
path_update
.
ch2
=
brir
.
timeData
(
:,
2
);
path_update
.
delay
=
distance
/
va
.
get_homogeneous_medium_sound_speed
();
% will generate smooth
d
oppler
path_update
.
delay
=
distance
/
va
.
get_homogeneous_medium_sound_speed
();
% will generate smooth
D
oppler
even for fast motion
va
.
set_rendering_module_parameters
(
'MyGenericRenderer'
,
path_update
);
% Increment core clock
...
...
@@ -66,7 +65,6 @@ for n = 1:length( x )
waitbar
(
n
/
numsteps
)
end
close
(
h
)
va
.
disconnect
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment