Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
toolbox
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
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)
toolbox
Commits
306ca1bb
Commit
306ca1bb
authored
Jun 24, 2019
by
Lukas Aspöck
Browse files
Options
Downloads
Patches
Plain Diff
added RAVEN HOA simulation example
parent
8a172160
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
applications/SoundFieldSimulation/Raven/ita_raven_demo_HOA.m
+54
-0
54 additions, 0 deletions
applications/SoundFieldSimulation/Raven/ita_raven_demo_HOA.m
with
54 additions
and
0 deletions
applications/SoundFieldSimulation/Raven/ita_raven_demo_HOA.m
0 → 100644
+
54
−
0
View file @
306ca1bb
%% RAVEN simulation: Example for HOA simulation of a shoebox (only encoded RIRs)
% Author: las@akustik.rwth-aachen.de
% date: 2019/06/26
%
% <ITA-Toolbox>
% This file is part of the application Raven for the ITA-Toolbox. All rights reserved.
% You can find the license for this m-file in the application folder.
% </ITA-Toolbox>
%% project settings
ravenBasePath
=
'C:\ITASoftware\Raven\'
;
myLength
=
9
;
myWidth
=
7
;
myHeight
=
3
;
projectName
=
[
'myHOA_ShoeboxRoom'
num2str
(
myLength
)
'x'
num2str
(
myWidth
)
'x'
num2str
(
myHeight
)
];
%% create project and set input data
rpf
=
itaRavenProject
([
ravenBasePath
'RavenInput\Classroom\Classroom.rpf'
]);
% modify path if not installed in default directory
rpf
.
copyProjectToNewRPFFile
([
ravenBasePath
'RavenInput\'
projectName
'.rpf'
]);
rpf
.
setProjectName
(
projectName
);
rpf
.
setModelToShoebox
(
myLength
,
myWidth
,
myHeight
);
rpf
.
setNumParticles
(
60000
);
% 60,000 particles for ray tracing simulation
rpf
.
setFilterLength
(
2000
);
% FilterLength (in ms)
rpf
.
setISOrder_PS
(
2
);
% set Image source order
%% HOA configuration
rpf
.
setGenerateBRIR
(
0
);
% deactivate binaural filters
rpf
.
setGenerateRIR
(
0
);
% deactivate mono filters
rpf
.
setGenerateISHOA
(
1
);
% activate HOA for image sources
rpf
.
setGenerateRTHOA
(
1
);
% activate HOA for ray tracing
rpf
.
setAmbisonicsOrder
(
2
);
% set HOA Order
%% adjust wall materials of room
for
iMat
=
1
:
6
myAbsorp
=
0.1
*
ones
(
1
,
31
);
% 10% absorption for all walls
myScatter
=
0.3
*
ones
(
1
,
31
);
% 30% scattering for all walls
rpf
.
setMaterial
(
rpf
.
getRoomMaterialNames
{
iMat
},
myAbsorp
,
myScatter
);
end
%% start simulation
rpf
.
run
;
%% get results: RAVEN HOA results use the ANC notation: https://en.wikipedia.org/wiki/Ambisonic_data_exchange_formats#ACN
RIRs
=
rpf
.
getAmbisonicsImpulseResponseItaAudio
;
% as ITA audio object
RIRs_raw
=
rpf
.
getAmbisonicsImpulseResponse
;
% as matrix
%% check results
ita_plot_time_dB
(
RIRs
);
%% and now?
% results need to be convolved with an anechoic signal (ita_convolve)
% and then decoded using a HOA decoder, e.g., using
% ita_hoa_decode(Bformat, LoudspeakerPos, varargin) for B-Format signals
\ No newline at end of file
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