Iceberg: Hybrid Auralization for Minimalist Setups

Iceberg is a hybrid spatial audio engine for reproducing realistic acoustic scenes with minimal hardware. By combining the localization precision of VBAP with the envelopment of Ambisonics, it lets researchers build “ecological” listening environments with as few as four loudspeakers.
The Problem
People with hearing loss are challenged most in noisy social settings, and testing them in
such conditions usually requires a large laboratory. Loudspeaker-based virtualization
methods trade off: with few loudspeakers, first-order Ambisonics conveys envelopment but
blurs localization, while VBAP localizes sharply but conveys little of the room.
How It Works
Iceberg splits each room impulse response (RIR) at its centre time ($T_s$):
- Direct sound and early reflections (up to $T_s$) are rendered with VBAP, for
localization.
- Late reverberation (after $T_s$) is rendered with first-order Ambisonics, for
envelopment.
Both parts go through the per-loudspeaker calibration of the reproduction room (1/3-octave
filters and SPL alignment) and are summed on a four-loudspeaker layout.
Key Features
- Minimal hardware: designed for four-loudspeaker setups.
- Pure MATLAB runtime: no ITA-Toolbox needed to render or to calibrate.
- Room calibration tools: microphone calibration, per-loudspeaker filters and SPL
alignment (see Calibration).
- Evaluated in the thesis with objective measures, not in listening tests with
participants (see Thesis & Research).
- Numerically verified implementation: v1.0.0 matches an ITA-Toolbox reference at
machine precision. Its level stage differs from the 2020 implementation used in the
thesis (see Level Stage).
Getting Started
Prerequisites
- MATLAB with the Signal Processing Toolbox (tested with R2026a).
- Two runtime toolboxes by Archontis Politis (Aalto University):
Vector-Base-Amplitude-Panning
and Higher-Order-Ambisonics.
setToolboxes clones both in full from their official remotes and checks out the
commits this release was verified against.
- Optional: ITA-Toolbox (
setToolboxes('ita')),
needed only to run the parity tests.
Usage
From the repository root:
addpath(genpath('src')); setToolboxes; % paths + polarch VBAP/HOA
[ir, fs] = audioread('src/wavFiles/rt_05/BFormat1.wav'); % 4-ch FuMa B-format
IR = struct('time', ir, 'samplingRate', fs, 'nSamples', size(ir, 1), ...
'nChannels', 4, 'trackLength', size(ir, 1)/fs);
signal = signalOptions(2); % pink noise, 44.1 kHz
C = load('src/calibration/currentCalibration.mat');
cfg = struct('newLevelFactor', C.newLevelFactor, 'iFactor', C.iFactor);
cfg.iLoudspeakerFreqFilter = C.iLoudspeakerFreqFilter;
cfg.lsArray = [180:15:345 0:15:165]; % loudspeaker ring, azimuths [deg]
cfg.activeLSNumbers = [1 7 13 19]; % the four loudspeakers Iceberg drives
cfg.ls_dir = [[180 270 0 90]; zeros(1, 4)]'; % their azimuth/elevation
cfg.ambisonicFormat = 'fuma'; % convention of the IR file (see below)
cfg.azimuthConvention = 'counterclockwise'; % 0 deg front, 90 deg left (see below)
out = iceberg(signal, IR, 45, 70, cfg); % source at 45 deg, 70 dB SPL input
% out.time: nSamples x 24, one column per loudspeaker of cfg.lsArray
For the anechoic IR (rt_00) set cfg.anechoicSpecialCase = true. iceberg_example.m
runs the same chain end to end and writes the four loudspeaker channels to
iceberg_example_output.wav (normalised); set playOnSoundcard = true and
playDeviceID to also play them through playrec.
Experiment window
iceberg_gui builds listening-test stimuli without a script:
iceberg_gui % a new experiment
iceberg_gui('test.iceberg-exp') % open a saved one
- Slots. An experiment is a list of slots (stimuli), each with its own IR, signal,
source angle, level, loudspeakers, calibration and options (IR format, angle convention,
dserFactor, anechoic case). The list on the left adds, duplicates, reorders and renames
them; a badge shows whether each one is rendered, stale (edited since) or failed.
- Loudspeakers. By default the four loudspeakers at 0, 90, 180 and 270 deg, one output
channel each, in the order of the four channel menus. A layout JSON replaces them: either
lsArray, activeLSNumbers and ls_dir (as src/calibration/currentLayout.json, the
ring the shipped calibration was measured on) or {"speakers": [{"azimuth": 0, "elevation": 0}, ...]}, all active.
- Level. With Use full scale the calibration is neutral and the level is in dBFS.
Without it, a calibration file sets the level in dB SPL: a
.mat such as
currentCalibration.mat, or a JSON with iFactor, newLevelFactor and loudspeakers
(tools/export_calibration.m writes one). It must cover every position of the layout.
- Source. Drag the source on the pad or use the slider. The lit loudspeakers are the
VBAP pair the render uses.
- Render and play. Render this slot and Render All Stale call
iceberg(); its
warnings are listed under Last render. Playback goes through playrec to the device
chosen in Experiment > Audio Settings, one output per loudspeaker. Prep mode plays
only the two loudspeakers of the VBAP pair, in stereo (the one drawn on the left of the
pad on L), to check stimuli on headphones. Play sequence plays the rendered slots in
order, with a pause or a Next button between them if Wait between slots is on.
- Trajectories (experimental). A slot can carry a programmed path: time:angle pairs
(
0:0, 2:90, 3:90, 5:-90, angles as written, so 0:0, 3:270 turns through 90 and 180)
typed in Trajectory (s:deg) or built with Add point (place the source, set Move
and Hold). Render trajectory renders the slot with the source following it; the
slot’s own render stays at its fixed angle. The pad draws the path as an amber spiral,
from the outside in. The renderer (iceberg_prepare_live, IcebergLiveEngine,
iceberg_trajectory) renders as iceberg() when the source holds still, and it
matched an independent native implementation of the same engine at the float32
floor. A moving source has no reference, so these renders are experimental.
- Live (experimental). With Live on, Play live plays the slot block by block and
the pad (or the angle slider) moves the source while it plays, about 0.1 s behind.
MATLAB feeds the audio from its one thread, so heavy work meanwhile can interrupt it.
- Files. File > Save writes the experiment as
.iceberg-exp (JSON with the file
paths and settings, no audio). Export Slot Render (WAV) and Export Trajectory Render
(WAV) write a render as 32-bit float, one channel per loudspeaker. The signal is a WAV
file (its first channel is used); signalOptions and audiowrite make one.
- Theme. Dark by default; the sun / moon button at the top right switches to the
light theme and back, and the choice is kept. Themes need MATLAB R2025a or newer;
older releases show the light look.
- Room impulse responses: Ambisonics B-format, full sphere, any order. Declare the
convention of your files with
cfg.ambisonicFormat — see
Ambisonics impulse responses below. The shipped IRs
(src/wavFiles/rt_00, rt_05, rt_11: simulated rooms with reverberation times of 0,
0.5 and 1.1 s) are first-order FuMa at 44.1 kHz.
- Sampling rate: any. When the signal and the IR differ, the signal is resampled to
the IR rate, with a warning. The calibration filters are defined in frequency and apply
at any rate.
- Signals and speech material: Iceberg does not ship speech recordings.
signalOptions generates noise, sweeps and tones; signalOptions(6, 'speech.wav')
loads a speech recording of your own (mixed to mono), and
native_ltass(y, fs, targetFs, seconds) makes LTASS-shaped noise from it.
Ambisonics impulse responses
Iceberg decodes first-order FuMa B-format (W, X, Y, Z, with W scaled by 1/√2). Files in
another convention are converted — but only when you declare it, because the channel order
cannot be told apart from the audio, and a wrong order decodes the room from the wrong
directions (a source in front can come out behind).
| Convention |
cfg.ambisonicFormat |
First four channels |
Normalization (plane wave s) |
W/|(X,Y,Z)| |
| FuMa |
'fuma' (assumed when undeclared) |
W, X, Y, Z |
W = s/√2; X, Y, Z = s·direction |
0.71 |
| AmbiX (ACN order, SN3D) |
'ambix' |
W, Y, Z, X |
W = s; X, Y, Z = s·direction |
1.00 |
| ACN order, N3D |
'n3d' |
W, Y, Z, X |
W = s; X, Y, Z = √3·s·direction |
0.58 |
- Higher orders. A file with (N+1)² channels (4, 9, 16, …) is reduced to first order by
keeping its first four channels. In every convention above these hold the first-order
components whatever the order N: ACN numbers the channels n² + n + m + 1, so W, Y, Z, X
always come first, and FuMa always starts with W, X, Y, Z. The four channels are then
converted as in the table. The spatial detail of the higher orders is discarded; files
made with order-dependent weights (e.g. max-rE) keep those weights in their first-order
part.
- Not supported (error): mixed-order or horizontal-only layouts (channel counts that
are not (N+1)²) and the SID channel ordering. Convert such files to full-sphere FuMa or
ACN first.
- Not detectable — check your files: an encoding with the Condon-Shortley phase (X and Y
sign-inverted, which rotates the horizontal scene by 180°), and a wrong channel order
combined with the right normalization.
- Axes: the impulse response must follow the Ambisonics axes — X to the front of the
receiver, Y to its left, Z up — as FuMa, AmbiX and ODEON’s B-format output do.
Azimuth convention
The angles you give Iceberg — the source angle, cfg.lsArray and cfg.ls_dir — are
counted counter-clockwise by default: 0° in front, 90° to the left, 180° behind, 270°
to the right. This is the convention of Ambisonics (Y points left), of the polarch toolboxes
and of ODEON (counter-clockwise azimuths are positive).
If your loudspeaker ring is labelled clockwise (90° on the right), declare it with
cfg.azimuthConvention = 'clockwise'. Iceberg then mirrors the impulse response’s Y axis
before decoding, so the late (Ambisonics) part comes out of the loudspeakers your labels
name. The VBAP part and the nearest-loudspeaker anchor compare your labels with each other
and do not depend on the convention. With the wrong convention the direct sound still
arrives from the labelled angle, but the late field is mirrored left-right — an error that
is easy to miss by ear.
cfg.azimuthConvention |
0° |
90° |
180° |
270° |
'counterclockwise' (assumed when undeclared) |
front |
left |
back |
right |
'clockwise' |
front |
right |
back |
left |
Warnings. iceberg() announces every change it makes to its inputs; silence one with
warning('off', id) once you have checked it.
| Warning ID |
When |
What to do |
iceberg:ambisonicFormatAssumed |
cfg.ambisonicFormat is not set (shown once per MATLAB session) |
declare the convention of your files |
iceberg:azimuthConventionAssumed |
cfg.azimuthConvention is not set (shown once per MATLAB session) |
declare how your ring is labelled |
iceberg:ambisonicConversion |
an AmbiX or N3D file was converted to FuMa |
nothing, if the declaration is right |
iceberg:ambisonicOrderReduced |
the IR has order N > 1 |
nothing: only its first order is used |
iceberg:ambisonicNormalizationSuspect |
around the direct sound (±0.25 ms), W/|(X,Y,Z)| after conversion is not close to 0.71 — e.g. 1.00 for an AmbiX file read as FuMa, 0.58 for an N3D file read as FuMa |
check cfg.ambisonicFormat; a direct sound that is not a plane wave (a very close source) can also trigger it |
iceberg:resampledSignal |
the signal and IR sampling rates differ |
nothing: the signal is resampled to the IR rate |
Calibration
src/calibration/calibration_LSRoom.m calibrates the reproduction room (audio hardware
required): microphone calibration with a calibrator, per-loudspeaker transfer functions
and 1/3-octave filters (getTF, sweep at -22 dBFS), and SPL alignment of every
loudspeaker (getLevel). Neither stage plays a stimulus above digital full scale, and
getLevel stops after maxIterations corrections if a loudspeaker does not converge.
Playback and recording use the embedded playrec MEX (third_party/playrec, Apple
Silicon binary; other platforms compile it from the upstream source); set the device IDs
(playDeviceID, recDeviceID) at the top of the script, since playrec treats -1 as “no
device”. The absolute scale
of the microphone stage has not been re-validated on hardware since the migration to
native MATLAB. Details, including where the result is saved, are in
src/calibration/readme.md.
Level Stage
- VBAP branch: one common scaler for all channels, so the VBAP gains reach the
loudspeakers unchanged (the in-pair ratio follows the tangent law), and one SPL anchor:
level (dB SPL) maps to the gain 10^((level - lsdBperVolt)/20). level = 'n'
bypasses the scaling; the per-loudspeaker filter is still applied.
- Level contract:
level is the SPL of the rendered input, not the SPL at the
listener; reverberation adds energy on top. The direct branch plays at the declared
level by default (configSetup.dserFactor = 'unity'); 'thesis' applies the
max(DSER) factor of the 2020 chain (-3.01 dB for the shipped IRs), and a numeric value
scales manually.
- Ambisonics branch: the SPL is anchored to the loudspeaker nearest to the source
(ties broken clockwise).
- Changes from the 2020 implementation: the per-channel RMS normalization, the
squared-cosine in-pair level law and the pair-selection cascade were removed.
configSetup.levelMode / configSetup.pairSelection are obsolete: they warn and are
ignored. The removed modes are available from the author on request.
Implementation and Verification
The runtime is pure MATLAB: every ITA-Toolbox primitive the chain used has a native
replica in src/utils/native_*.m. The ITA-Toolbox serves only as the reference in the
parity tests.
- Level stage: native
calibrate_vbap matches an ITA-primitives reference
(tests/calibrate_vbap_ita.m) at ~4e-16 relative error.
- Full chain:
iceberg() matches an ITA-primitives reconstruction over 72 azimuths x
3 IR sets, both with the four loudspeakers alone and inside a 24-position ring
(432 renders), worst relative error 1.5e-13 (tests/sweep_corrected_parity.m).
- Native replicas: each is tested against its ITA counterpart; tolerances and
measured values are pinned in the test files.
Tests
matlab -batch "run('tests/run_all_tests.m')"
Runs the unit, integration and end-to-end suites. Without the ITA-Toolbox, the
ITA-dependent tests are skipped, not failed. tests/run_tests_with_report.m writes an
HTML report. The 432-render parity sweep (tests/sweep_corrected_parity.m, a few
minutes) requires the ITA-Toolbox.
On GitHub the suite runs on every push to main, on pull requests and once a week,
without the ITA-Toolbox (legacy). The report of the last run on main lists every test
and the measured error of every tolerance check: https://aguirresl.github.io/Iceberg/.
The same page comes out locally in tests/report/out/index.html:
matlab -batch "addpath('src/utils'); setToolboxes; addpath('tests/report'); iceberg_report_build"
Contributing
See CONTRIBUTING.md for setup, tests, the oracle-first rule and
versioning, and use the issue and pull-request templates in .github/.
How to Cite
If you use Iceberg, cite the thesis:
@phdthesis{aguirre_2023,
title = {Iceberg: a loudspeaker-based room auralization method for auditory research},
author = {Aguirre, Sergio Luiz},
school = {University of Nottingham},
year = {2023},
month = jul,
url = {https://repository.nottingham.ac.uk/handle/123456789/58572}
}
and the toolboxes it is built on (per their READMEs):
Archontis Politis, Microphone array processing for parametric spatial audio
techniques, 2016. Doctoral Dissertation, Department of Signal Processing and
Acoustics, Aalto University, Finland.
V. Pulkki, “Virtual sound source positioning using vector base amplitude panning,”
J. Audio Eng. Soc., vol. 45, no. 6, pp. 456-466, 1997.
Credits
The spatial audio core is built on Archontis Politis’ toolboxes
(Vector-Base-Amplitude-Panning |
Higher-Order-Ambisonics, BSD), and
the core vbap() inside them is Ville Pulkki’s implementation. The native replicas of
ITA functions are derived from the ITA-Toolbox
source and were verified against it. This product includes software developed by the
Institute of Technical Acoustics (RWTH Aachen University).
Use of AI
Parts of the code, tests and documentation were written with the help of Claude (Anthropic),
under the author’s direction and review. The results rest on the checks described in
Implementation and Verification and on the author’s own
listening.
License
BSD 3-Clause (see LICENSE). Free to use, modify and redistribute — including
commercially — with attribution; the name “Iceberg” and its authors may not be used to
endorse derived products without written permission. Third-party toolboxes keep their own
licenses and credits. Files derived from the ITA-Toolbox (BSD 4-Clause) or from polarch
Higher-Order-Ambisonics (BSD 3-Clause) also carry their conditions;
THIRD_PARTY_NOTICES.txt lists them and reproduces both licenses.
Thesis & Research
Iceberg was developed in the PhD thesis Iceberg: a loudspeaker-based room auralization
method for auditory research (University of Nottingham, 2023).
Download the thesis (PDF)
Key Chapters
- Chapter 3: Binaural Cue Distortions – VBAP and Ambisonics compared through a
calibrated setup: spatial distortions in the binaural cues, including the effect of a
second listener.
- Chapter 4: Behavioral Study – how signal-to-noise ratio and reverberation affect
listening effort in a first-order Ambisonics virtualization (24 loudspeakers), measured
with a questionnaire, EEG and word recognition.
- Chapter 5: The Iceberg Method – the hybrid method, verified through binaural cues in
three simulated rooms and a psychoacoustic model of spatial accuracy, with and without
hearing aids. Validation with participants was not possible during the COVID-19
pandemic.
Core Findings (thesis, 2020 implementation)
- Center Time ($T_s$) serves as the split point between the early and late parts of
the impulse response.
- Localisation (model estimate): for a centred listener in the anechoic room, the
May and Kohlrausch model placed the virtual sources of the four-loudspeaker setup at a
median of 11° (mean 12°) from their targets across the frontal half-plane. The larger
errors are for sources 20° to 50° to the side, whose image is pulled towards the front
(up to 33° on the left, 21° on the right); near the front and between 60° and 80° to
either side the error is under 8°. With real loudspeakers the same model errs by 3° on
average, so most of the error comes from the reproduction. The thesis concludes the
method can be considered for audiological tests, within its stated limitations.
- These figures belong to the 2020 implementation, whose in-pair panning law was a
squared-cosine law, not the VBAP tangent law that v1.0.0 implements (see
Level Stage). v1.0.0 has not yet been measured with a head-and-torso
simulator or with listeners.
评论