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
566c6cf6
Commit
566c6cf6
authored
Jan 30, 2017
by
Lukas Aspöck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changed comments to english
parent
4b9194f6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
26 deletions
+29
-26
applications/VirtualAcoustics/Raven/ita_raven_demo.m
applications/VirtualAcoustics/Raven/ita_raven_demo.m
+29
-26
No files found.
applications/VirtualAcoustics/Raven/ita_raven_demo.m
View file @
566c6cf6
% 1.
Matlab Pfad einstellen!!!!!
% 1.
set/check matlab paths
% <ITA-Toolbox>
...
...
@@ -7,70 +7,73 @@
% </ITA-Toolbox>
%% Projektdatei einlesen
% project laden
rpf
=
itaRavenProject
(
'..\RavenInput\Classroom\trilateration.rpf'
);
% load ita raven project
rpf
=
itaRavenProject
(
'..\RavenInput\Classroom\Classroom.rpf'
);
%% Simulationsparameter einstellen
%
spiegelquellen bis 2. ordnung
%
Image sources up to second order
rpf
.
setISOrder_PS
(
2
);
% 20000 ray tracing partikel
rpf
.
setNumParticles
(
200
00
);
rpf
.
setNumParticles
(
200
);
%
Lnge der Impulsantwort einstellen (sollte mindestens der Nachhallzeit entprechen!
)
%
set impulse response length in ms (at least length of reverberation time
)
rpf
.
setFilterLength
(
2800
);
%[ms]
% rpf.setFilterLengthToReverbTime(); % schtzt ber Eyring die Nachhallzeit und passt die Filterlnge an
% rpf.setFilterLengthToReverbTime(); % estimates reverberation time and
% sets rpf.filterLength to this value
%
Raumtemperatur einstellen
%
set room temperature
rpf
.
setTemperature
(
21
);
%C
%%
Simulationsausgabe definieren
%
befehle monaurale impulsantwort
%%
Define simulation outputs
%
create monaural room impulse response
rpf
.
setGenerateRIR
(
1
);
%
befehle binaurale impulsantwort
%
create binaural room impulse response
rpf
.
setGenerateBRIR
(
1
);
%
histogramme berechnen
%
create and export energy histograms
rpf
.
setExportHistogram
(
1
);
% histogramme z.B. bentigt fr schnelle Nachhallzeitauswertung (RavenProject.getT30)
%% Quell- und Empfngerdaten
%
quell position setzen
%
set source positions
rpf
.
setSourcePositions
([
9
1.7
-
2.5
]);
rpf
.
setSourceViewVectors
([
-
1
0
0
]);
rpf
.
setSourceUpVectors
([
0
1
0
]);
%
receiver position setzen
%
set receiver positions
rpf
.
setReceiverPositions
([
4.4500
1.0000
-
3.9000
]);
%
quellnamen setzen
%
set sound source names
rpf
.
setSourceNames
(
'Speaker Left'
);
%
directivity setzen
%
set source directivity
rpf
.
setSourceDirectivity
(
'KH_O100_Oli_5x5_3rd_relativiert_auf_azi0_ele0.daff'
);
%%
Simulation starten
%
simulation abfeuer
n
%%
start simulation
%
run simulatio
n
rpf
.
run
;
%% Ergebnisse abholen
%
monaurale impulsantwort holen
mono_ir
=
rpf
.
getMonauralImpulseResponseItaAudio
();
%
oder rpf.getMonauralImpulseResponse() ohne
ITA-Toolbox
%
get room impulse responses
mono_ir
=
rpf
.
getMonauralImpulseResponseItaAudio
();
%
rpf.getMonauralImpulseResponse() without
ITA-Toolbox
binaural
=
rpf
.
getBinauralImpulseResponseItaAudio
();
reverb_time
=
rpf
.
getT30
();
%% ITA-Toolbox......
mono_ir
.
plot_time
;
% plot
te monaurale IR im Zeitbereich
binaural
.
plot_freq
;
% plot
te binaurale IR im Frequenzbereich
mono_ir
.
plot_time
;
% plot
monaural RIR in time domain
binaural
.
plot_freq
;
% plot
binaural RIR in time domain
%%
Beispiel: Lautsprecher einrechnen
%%
Example: Include loudspeaer frequency response in RIR (for comparisons with measurements)
ls_O100
=
ita_read
(
'..\RavenDatabase\FrequencyResponse\KH_O100_reference_holesclosed_final_at1V1m_fft14.ita'
);
ir_mit_lautsprecher
=
ita_convolve
(
mono_ir
,
ls_O100
);
%% Additional features
% model zeigen
% rpf.plotModel;
% show room model including sound sources
rpf
.
plotModel
;
% show absorption coefficients
rpf
.
plotMaterialsAbsorption
;
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