Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
toolbox
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
12
Issues
12
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
4
Merge Requests
4
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Institute of Technical Acoustics (ITA)
toolbox
Commits
306ca1bb
Commit
306ca1bb
authored
Jun 24, 2019
by
Lukas Aspöck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added RAVEN HOA simulation example
parent
8a172160
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
54 additions
and
0 deletions
+54
-0
applications/SoundFieldSimulation/Raven/ita_raven_demo_HOA.m
applications/SoundFieldSimulation/Raven/ita_raven_demo_HOA.m
+54
-0
No files found.
applications/SoundFieldSimulation/Raven/ita_raven_demo_HOA.m
0 → 100644
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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