motivation object-oriented programming graphical - ita-toolbox

1
P. Dietrich, B. Masiero, M. Pollow, R. Scharrer, M. M¨ uller-Trapet Institute of Technical Acoustics RWTH Aachen University, Germany [email protected] MATLAB Toolbox for the Comprehension of Acoustic Measurements and Signal Processing Motivation A platform-independent MATLAB toolbox called ITA-Toolbox is presented that offers functionality for a wide range of acoustic measurement and sig- nal processing tasks. Students have access to the source code of most functions which enables them to follow and comprehend all parts of the signal processing chain [3]. Using MATLAB scripts based on the ITA-Toolbox functions, signal processing tasks can be fully automated. This allows students to easily measure directivities or to calculate rever- beration times or acoustic source power. Meta data (physical units, channel names, sampling rates) are always kept consistent. Object-Oriented Programming To make MATLAB code generation as easy as possible, the ITA-Toolbox is designed to provide an intuitive handling using MATLAB’s new object-oriented possibilities. Encapsulated class objects (audio data, measurement set- tings, spatial information) provide intelligent behavior.Common built-in routines and operators of MATLAB can be overloaded [1]. Specific oper- ators are redefined for time and frequency domain (*, /, ^ frequency domain, .*, ./, .^ time do- main), as well as well-known MATLAB function names (such as plot, mean, conj) for various kind of objects. Graphical User Interface Graphic frontends for the command line func- tions lighten the first steps with MATLAB, the ITA-Toolbox , and signal processing. The GUI uses variables in the MATLAB workspace providing a seamlessly combined usage of both approaches. Laboratory Laboratory Measurement/Simulation LMS Virtual Lab, BK Pulse Sysnoise, MonkeyForest Universal File Format; ASCII .dat, .spk, .mat, .csv, .uff, .unv, .wav Import Data/Results/Geometry Universal File Format, CSV, Wave, mp3, PDF (3D), native MATLAB [Measurement Reports] Export Audio/TP/Geometry Time History, Cmplx.Spectrum, Spectrogram, Cepstrum Directivitiy/Balloon/IsobarPlot 2D-Distribution WebCam Plots Parametric GUI concept: Modular Enhancement of Command-Line Functions Main Window: Connecting Modular GUIs and Plot Routines GUI PortAudio/PortMedia ASIO/CoreAudio/ALSA Measurement/Stimulus Continious Level Meter Audio IO Signals/TP/Coordinates Excitation Signals:Sweep/MLS Impedances:Loudspeaker,Plate Two-Port:Mass-Spring-Damper Room Impulse Responses Geometry/Mesh Synthesis Hardware/Motor Control RS232 Communication: Turntable/Arm, X-Y-Bench BK Nexus, Laser Vibrometer MIDI Communication: Preamp/Amp/ModulITA Remote Operators Classes Units Kernel Transformation normalized FFT Cepstrum, Hilbert Filtering/Windowing Fractional Octaves Zero/Minimum-Phase Shelving/Low-High-Pass Calibration Measurement Chains Pistonphone/Sensors Broadband/Latency Actuator Compensation Directivity spherical/cylindrical harmonic calculation Level/Shaping Loudness dB(A)/dB(C) Platforms Windows,Linux, Mac OS X www.akustik.rwth-aachen.de/toolbox Applications developer user Loudspeaker el.Impedance/Two-Port Thiele-Small Parameters Equivalent Circuit Diagram Room Acoustics ISO 3382, Reverberation Time Clarity, Definition, IACC Sound Power Free-Field Reverberation Chamber Acoustic Impedance Kundt’s Tube In-Situ: p-u/p-p Source Localization Beamforming, NAH Surface Velocity Laboratory on Acoustics Scripts to be completed by students: Sound Power Calculation 3 Microphone Kundt’s Tube Filter Design/CTC Binarual Processing Auditory Model HRTF, CTC Laboratory Since MATLAB code does not require compilation, the ITA-Toolbox is a very comfortable framework to provide students with scripts missing impor- tant parts, e.g. for crosstalk cancellation filters, Kundt’s tube and sound isolation. Students must first complete the codes for data processing, gain- ing a broader knowledge about the subject under study, to then use it for the tasks required in the courses. Script Example %% building excitation signal sweep = ita generate('sweep',16,[40 18000]); %% measurement result = ita portaudio(sweep,'inputChannel',1,'outputChannel',1); %% deconvolution RIR = (result/sweep).'; %% Filter and Window RIR = ita filter(RIR,[40 18000]); RIR = ita time window(RIR,[0.8 1.2],'time','crop'); %% Plot plot(RIR); %% Room Acoustics ISO 3382 parameters = ita roomacoustics(RIR); bar(parameters.RT); Acknowledgment The authors would like to thank Prof. Michael Vorl¨ander and Dr. Gottfried Behler for their support and Dr. Swen M¨ uller [2] for his coorporation. PortMusic and playRec were used to realize stable audio data acquisition with MATLAB. Thanks to all users for their constructive feedback. References [1] Register, A. H.: A Guide to MATLAB Object-Oriented Programming. Chapman & Hall/CRC, 2007 [2] M¨ uller, S. and Massarani, P.: Transfer-Function Measurement with Sweeps. Journal of the Audio Engineering Society, 2001 [3]Fingerhuth, S.; Dietrich, P. and Kaldenbach, R.: Mess-’Blackbox’ zum Verst¨ andnis des ¨ Ubertragungs-verhaltens und der akustischen Messtechnik, Fortschritte der Akustik - DAGA, 2010

Upload: others

Post on 12-Feb-2022

13 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Motivation Object-Oriented Programming Graphical - ITA-Toolbox

P. Dietrich, B. Masiero, M. Pollow, R. Scharrer, M. Muller-TrapetInstitute of Technical Acoustics

RWTH Aachen University, [email protected]

MATLAB Toolbox for the Comprehension ofAcoustic Measurements and Signal Processing

MotivationA platform-independent MATLAB toolbox called

ITA-Toolbox is presented that offers functionality

for a wide range of acoustic measurement and sig-

nal processing tasks. Students have access to the

source code of most functions which enables them

to follow and comprehend all parts of the signal

processing chain [3]. Using MATLAB scripts based

on the ITA-Toolbox functions, signal processing

tasks can be fully automated. This allows students

to easily measure directivities or to calculate rever-

beration times or acoustic source power. Meta data

(physical units, channel names, sampling rates) are

always kept consistent.

Object-Oriented ProgrammingTo make MATLAB code generation as easy

as possible, the ITA-Toolbox is designed to

provide an intuitive handling using MATLAB’s

new object-oriented possibilities. Encapsulated

class objects (audio data, measurement set-

tings, spatial information) provide intelligent

behavior.Common built-in routines and operators

of MATLAB can be overloaded [1]. Specific oper-

ators are redefined for time and frequency domain

(*, /, ^ frequency domain, .*, ./, .^ time do-

main), as well as well-known MATLAB function

names (such as plot, mean, conj) for various kind

of objects.

Graphical User InterfaceGraphic frontends for the command line func-

tions lighten the first steps with MATLAB, the

ITA-Toolbox , and signal processing. The GUI uses

variables in the MATLAB workspace providing a

seamlessly combined usage of both approaches.

Laboratory

Laboratory

Measurement/SimulationLMS Virtual Lab, BK PulseSysnoise, MonkeyForestUniversal File Format; ASCII.dat, .spk, .mat, .csv, .uff, .unv, .wav

Import Data/Results/GeometryUniversal File Format, CSV,Wave, mp3, PDF (3D), native MATLAB[Measurement Reports]

Export

Audio/TP/GeometryTime History, Cmplx.Spectrum,Spectrogram, CepstrumDirectivitiy/Balloon/IsobarPlot2D-DistributionWebCam

Plots

Parametric GUI concept:Modular Enhancement of Command-Line Functions

Main Window: Connecting Modular GUIs and Plot Routines

GUI

PortAudio/PortMediaASIO/CoreAudio/ALSAMeasurement/StimulusContinious Level Meter

Audio IO

Signals/TP/CoordinatesExcitation Signals:Sweep/MLSImpedances:Loudspeaker,Plate Two-Port:Mass-Spring-DamperRoom Impulse ResponsesGeometry/Mesh

Synthesis

Hardware/Motor ControlRS232 Communication:Turntable/Arm, X-Y-BenchBK Nexus, Laser VibrometerMIDI Communication:Preamp/Amp/ModulITA

Remote

OperatorsClassesUnits

Kernel

Transformationnormalized FFTCepstrum, Hilbert

Filtering/WindowingFractional OctavesZero/Minimum-PhaseShelving/Low-High-Pass

CalibrationMeasurement ChainsPistonphone/SensorsBroadband/LatencyActuator Compensation

Directivityspherical/cylindricalharmonic calculation

Level/ShapingLoudnessdB(A)/dB(C)

PlatformsWindows,Linux,Mac OS X

www.akustik.rwth-aachen.de/toolbox

Applications

deve

loper

user

Loudspeakerel.Impedance/Two-PortThiele-Small ParametersEquivalent Circuit Diagram

Room Acoustics ISO 3382, Reverberation TimeClarity, Definition, IACC

Sound PowerFree-FieldReverberation Chamber

Acoustic ImpedanceKundt’s TubeIn-Situ: p-u/p-p

Source LocalizationBeamforming, NAHSurface Velocity

Laboratory on AcousticsScripts to be completed by students:Sound Power Calculation3 Microphone Kundt’s TubeFilter Design/CTC

Binarual ProcessingAuditory ModelHRTF, CTC

LaboratorySince MATLAB code does not require compilation,

the ITA-Toolbox is a very comfortable framework

to provide students with scripts missing impor-

tant parts, e.g. for crosstalk cancellation filters,

Kundt’s tube and sound isolation. Students must

first complete the codes for data processing, gain-

ing a broader knowledge about the subject under

study, to then use it for the tasks required in the

courses.

Script Example%% building excitation signalsweep = ita generate('sweep',16,[40 18000]);

%% measurementresult = ita portaudio(sweep,'inputChannel',1,'outputChannel',1);

%% deconvolutionRIR = (result/sweep).';

%% Filter and WindowRIR = ita filter(RIR,[40 18000]);RIR = ita time window(RIR,[0.8 1.2],'time','crop');

%% Plotplot(RIR);

%% Room Acoustics ISO 3382parameters = ita roomacoustics(RIR);bar(parameters.RT);

AcknowledgmentThe authors would like to thank Prof. Michael Vorlander and Dr. Gottfried Behler fortheir support and Dr. Swen Muller [2] for his coorporation. PortMusic and playRecwere used to realize stable audio data acquisition with MATLAB. Thanks to all usersfor their constructive feedback.

References[1] Register, A. H.: A Guide to MATLAB Object-Oriented Programming. Chapman &

Hall/CRC, 2007

[2] Muller, S. and Massarani, P.: Transfer-Function Measurement with Sweeps. Journalof the Audio Engineering Society, 2001

[3] Fingerhuth, S.; Dietrich, P. and Kaldenbach, R.: Mess-’Blackbox’ zum Verstandnisdes Ubertragungs-verhaltens und der akustischen Messtechnik, Fortschritte derAkustik - DAGA, 2010