Skip to content
Snippets Groups Projects
Commit ce50a6ff authored by Lukas Aspöck's avatar Lukas Aspöck Committed by Marco Berzborn
Browse files

changed comments to english

parent 6ac350e3
No related branches found
No related tags found
No related merge requests found
% 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(20000);
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 abfeuern
%% start simulation
% 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; % plotte monaurale IR im Zeitbereich
binaural.plot_freq; % plotte 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;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment