Higher-Order Ambisonic Decoder — AmbiX to Loudspeaker Arrays

Decode 1st–5th-order Full-3D ambiX ACN/SN3D to horizontal or immersive loudspeaker layouts with automatic order detection and actual spherical-harmonic matrix-rank diagnostics.

Author: Shai CohenAffiliation: Department of Music, Bar-Ilan University, IsraelLicense: MIT LicenseRepo: Praat AudioTools
Contents:

What this does

Higher-Order Ambisonic Decoder converts Full-3D ambiX B-format (ACN/SN3D) into loudspeaker feeds. It accepts orders 1–5 and provides horizontal, immersive, and cinema-style layouts including 7.1.4 and 22.2.

The decoder never asks the user to declare the HOA order. The order is inferred from the actual input component count, preventing a 4-channel HOA1 file from being accidentally treated as HOA5.

Automatic order detection

InputDetected format
4 componentsHOA1
9 componentsHOA2
16 componentsHOA3
25 componentsHOA4
36 componentsHOA5

Combined mode accepts one multichannel AmbiX Sound. Legacy mode accepts the same component counts as separately selected mono Sounds in ACN order.

Built-in loudspeaker layouts

Available targets include 2.0, triangle, quad, pentagon, hexagon, 5.0, 5.1, 7.0, 7.1, 8-ring, 12-ring, 16-ring, 7.1.4, and 22.2. LFE output slots are created as silence, because Ambisonics carries no directional LFE signal.

Auto full-rank policy: HOA1 → 7.1.4; HOA2 → 22.2; HOA3 → 22.2. HOA4 and HOA5 have no built-in full-rank target, so Auto stops rather than silently discarding component dimensions. You may still choose 22.2 manually and receive an explicit rank warning.

Actual spherical-harmonic matrix rank

The script evaluates the real spherical-harmonic sampling matrix for the exact loudspeaker geometry and reports its rank against the number of Ambisonic components.

HOA1 on 7.1.4 → rank 4 / 4 HOA2 on 22.2 → rank 9 / 9 HOA3 on 22.2 → rank 16 / 16 HOA4 on 22.2 → rank 20 / 25 HOA5 on 22.2 → rank 22 / 36

A full-rank result means the chosen directions span the component space. It does not mean that a simple projection decoder is perceptually optimal. Irregular arrays such as 7.1.4 and 22.2 are explicitly reported as approximate projection decodes.

Horizontal layouts and Full-3D input: a horizontal array cannot reproduce all vertical modes of Full-3D Ambisonics. The rank report exposes this directly instead of relying on speaker count alone.

Decode methods

MethodBehavior
Basic sampling / projectionRaw real-SH projection with per-order SN3D scaling.
Max-rEApplies order-dependent Max-rE weights to reduce side-lobe energy and improve directional concentration.
In-phaseApplies in-phase order weights for a more conservative, phase-coherent spatial pattern.

Shared peak protection attenuates all speaker feeds together only if needed, preserving relative decode levels.

Workflow examples

Spatial Trajectory Painter → HOA3 / 16ch
                         ↓
                 Ambisonic Decoder
                  ↙              ↘
              7.1.4              22.2
Speaker Bed → HOA Encoder → ambiX master → HOA Decoder → new speaker array

Interpretation and limitations