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
ce50a6ff
Commit
ce50a6ff
authored
8 years ago
by
Lukas Aspöck
Committed by
Marco Berzborn
8 years ago
Browse files
Options
Downloads
Patches
Plain Diff
changed comments to english
parent
6ac350e3
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/VirtualAcoustics/Raven/ita_raven_demo.m
+29
-26
29 additions, 26 deletions
applications/VirtualAcoustics/Raven/ita_raven_demo.m
with
29 additions
and
26 deletions
applications/VirtualAcoustics/Raven/ita_raven_demo.m
+
29
−
26
View file @
ce50a6ff
% 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 Nachhallzei
t en
tprechen!
)
%
set impulse response length in ms (at leas
t
l
en
gth 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
%
Raum
temperatur
einstellen
%
set room
temperatur
e
rpf
.
setTemperature
(
21
);
%C
%%
S
imulation
sausgabe definieren
%
befehl
e monaural
e
impuls
antwort
%%
Define s
imulation
outputs
%
creat
e monaural
room
impuls
e response
rpf
.
setGenerateRIR
(
1
);
%
befehl
e binaural
e
impuls
antwort
%
creat
e binaural
room
impuls
e 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
position
s
rpf
.
setSourcePositions
([
9
1.7
-
2.5
]);
rpf
.
setSourceViewVectors
([
-
1
0
0
]);
rpf
.
setSourceUpVectors
([
0
1
0
]);
% receiver position
setzen
%
set
receiver position
s
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'
);
%%
S
imulation
starten
% simulation
abfeuern
%%
start s
imulation
%
run
simulation
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
monaural
e
IR i
m Zeitbereich
binaural
.
plot_freq
;
% plot
te
binaural
e
IR i
m Frequenzbereich
mono_ir
.
plot_time
;
% plot monaural
R
IR i
n time domain
binaural
.
plot_freq
;
% plot binaural
R
IR i
n 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
;
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