Measurements and Spatial Audio
Audio Toolbox™ enables you to measure acoustics and impulse responses, encode and decode ambisonics, interpolate head-related transfer functions (HRTF), and return industry-standard audio measurements.
Apps
Impulse Response Measurer | Measure impulse response of audio system |
Functions
Filters
octaveFilter | Octave-band and fractional octave-band filter |
octaveFilterBank | Octave and fractional-octave filter bank |
weightingFilter | Frequency-weighted filter |
Head-Related Transfer Function
interpolateHRTF | 3-D head-related transfer function (HRTF) interpolation |
sofaread | Read SOFA files (Since R2023b) |
sofawrite | Write SOFA files (Since R2023b) |
sofaconvention | Create SOFA convention (Since R2023b) |
Spatially Oriented Format for Acoustics (SOFA)
sofaread | Read SOFA files (Since R2023b) |
sofawrite | Write SOFA files (Since R2023b) |
sofaconvention | Create SOFA convention (Since R2023b) |
SimpleFreeFieldHRIR | SimpleFreeFieldHRIR SOFA convention (Since R2023b) |
SimpleFreeFieldHRSOS | SimpleFreeFieldHRSOS SOFA convention (Since R2023b) |
SimpleFreeFieldHRTF | SimpleFreeFieldHRTF SOFA convention (Since R2023b) |
GeneralFIR | GeneralFIR SOFA convention (Since R2023b) |
GeneralSOS | GeneralSOS SOFA convention (Since R2023b) |
GeneralTF | GeneralTF SOFA convention (Since R2023b) |
GeneralTFE | GeneralTF-E SOFA convention (Since R2023b) |
GeneralFIRE | GeneralFIR-E SOFA convention (Since R2023b) |
FreeFieldHRIR | FreeFieldHRIR SOFA convention (Since R2023b) |
FreeFieldHRTF | FreeFieldHRTF SOFA convention (Since R2023b) |
SimpleHeadphoneIR | SimpleHeadphoneIR SOFA convention (Since R2023b) |
SingleRoomSRIR | SingleRoomSRIR SOFA convention (Since R2023b) |
SingleRoomMIMOSRIR | SingleRoomMIMOSRIR SOFA convention (Since R2023b) |
FreeFieldDirectivityTF | FreeFieldDirectivityTF SOFA convention (Since R2023b) |
Impulse Response Estimation
Meters and Measurements
loudnessMeter | Standard-compliant loudness measurements |
audioLevelMeter | Measure digital audio peak level (Since R2023a) |
splMeter | Measure sound pressure level of audio signal |
calibrateMicrophone | Calibration factor for microphone (Since R2020a) |
sisnr | Scale-invariant signal-to-noise ratio (Since R2024b) |
permutationInvariantSISNR | Permutation invariant SI-SNR (Since R2024b) |
octaveSpectrumEstimator | Compute octave-band spectrum (Since R2024b) |
UI Components
uiaudiometer | Create an audio meter component (Since R2023b) |
Properties
Meter Properties | Audio Meter UI component (Since R2023b) |
Blocks
Loudness Meter | Standard-compliant loudness measurements |
Weighting Filter | Weighted frequency response filter |
Octave Filter | Octave-band and fractional octave-band filter |
Octave Filter Bank | Octave-band and fractional octave-band filter bank (Since R2021a) |
Topics
- Measure and Manage Impulse Responses
Capture and analyze impulse response (IR) measurements by using the Impulse Response Measurer.
- Create an App to Play and Visualize Audio Files
Create an app in App Designer to play and visualize audio files.
- Surround Sound Matrix Encoding and Decoding
This example shows how to generate a stereo signal from a multichannel audio signal using matrix encoding, and how to recover the original channels from the stereo mix using matrix decoding.
Related Information
Featured Examples
Read, Analyze and Process SOFA Files
Load a SOFA file, analyze the HRTF measurements, and use them to spatialize an audio signal.
Impulse Response Measurement Using a NI USB-4431 Device
Measure an impulse response using a National Instruments (NI) USB-4431 sound and vibration device.
Room Impulse Response Simulation with Stochastic Ray Tracing
Use stochastic ray tracing to simulate the impulse response of a simple room.
Room Impulse Response Simulation with the Image-Source Method and HRTF Interpolation
Simulate the impulse response of a "shoebox" (cuboid) empty room.
Octave-Band and Fractional Octave-Band Filters
Design octave-band and fractional octave-band filters, including filter banks and octave SPL meters.
Audio Weighting Filters
Obtain A-weighting and C-weighting filters the weightingFilter System object in the Audio Toolbox™.
Sound Pressure Measurement of Octave Frequency Bands
Demonstrates how to measure sound pressure levels of octave frequency bands. A user interface (UI) enables you to experiment with various parameters while the measurement is displayed.
Active Noise Control with Simulink Real-Time
Design a real-time active noise control system using a Speedgoat® Simulink® Real-Time™ target.
Ambisonic Plugin Generation
This examples shows how to create ambisonic plugins using MATLAB® higher order ambisonic (HOA) demo functions. Ambisonics is a spatial audio technique which represents a three-dimensional sound field using spherical harmonics. This example contains an encoder plugin, a function to generate custom encoder plugins, a decoder plugin, and a function to generate custom decoder plugins. The customization of plugin generation enables a user to specify various ambisonic orders and various device lists for a given ambisonic configuration.
Ambisonic Binaural Decoding
Decode ambisonic audio into binaural audio using virtual loudspeakers. A virtual loudspeaker is a sound source positioned on the surface of a sphere, with the listener located at the center of the sphere. Each virtual loudspeaker has a pair of Head-Related Transfer Functions (HRTF) associated with it: one for the left ear and one for the right ear. The virtual loudspeaker locations along with the ambisonic order are used to calculate the ambisonic decoder matrix. The output of the decoder is filtered by the HRTFs corresponding to the virtual loudspeaker position. The signals from the left HRTFs are summed together and fed to the left ear. The signals from the right HRTFs are summed together and fed to the right ear. A block diagram of the audio signal flow is shown here.
Acoustic Beamforming Using a Microphone Array
Illustrates microphone array beamforming to extract desired speech signals in an interference-dominant, noisy environment. Such operations are useful to enhance speech signal quality for perception or further processing. For example, the noisy environment can be a trading room, and the microphone array can be mounted on the monitor of a trading computer. If the trading computer must accept speech commands from a trader, the beamformer operation is crucial to enhance the received speech quality and achieve the designed speech recognition accuracy.
Multicore Simulation of Acoustic Beamforming Using a Microphone Array
Beamform signals received by an array of microphones to extract a desired speech signal in a noisy environment. It uses the dataflow domain in Simulink® to partition the data-driven portions of the system into multiple threads and thereby improving the performance of the simulation by executing it on your desktop's multiple cores.
Live Direction of Arrival Estimation with a Linear Microphone Array
Acquire and process live multichannel audio. It also presents a simple algorithm for estimating the Direction Of Arrival (DOA) of a sound source using multiple microphone pairs within a linear array.
Positional Audio
Several basic aspects of audio signal positioning. The listener occupies a location in the center of a circle, and the position of the sound source is varied so that it remains within the circle. In this example, the sound source is a monaural recording of a helicopter. The sound field is represented by five discrete speaker locations on the circumference of the circle and a low-frequency output that is presumed to be in the center of the circle.
Binaural Audio Rendering Using Head Tracking
Track head orientation by fusing data received from an IMU, and then control the direction of arrival of a sound source by applying head-related transfer functions (HRTF).
Measure Impulse Response of an Audio System
The impulse response (IR) is an important tool for characterizing or representing a linear time-invariant (LTI) system. The impulseResponseMeasurer enables you to measure and capture the impulse response of audio systems, including:
Acoustic Echo Cancellation (AEC)
Apply adaptive filters to acoustic echo cancellation (AEC).
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)