IRCAM Pan to Binaural — User Guide
Places a mono or stereo source at a static or moving position, encodes it to Higher-Order Ambisonics, decodes it to a controlled virtual loudspeaker array, and renders the result to binaural stereo with IRCAM Spat5.
What this does
IRCAM Pan to Binaural is a spatializer and renderer for one mono or stereo Sound. It creates a spatial position or trajectory, encodes the source into a three-dimensional HOA field, decodes that field to a virtual loudspeaker array, and then renders those loudspeakers to the two ears through HRTFs.
The tool is intended for creative spatial placement and movement rather than for converting an already-authored loudspeaker mix.
How it complements Multichannel to Binaural
| Tool | Input | Main role |
|---|---|---|
| IRCAM Pan to Binaural | Mono or stereo source | Creates the spatial position / movement, then renders it binaurally. |
| IRCAM Multichannel to Binaural | Existing loudspeaker feeds | Preserves the given loudspeaker layout and virtualizes it through HRTFs. |
In other words, Pan to Binaural is a spatializer + renderer; Multichannel to Binaural is primarily a renderer.
Quick start
- Install IRCAM Spat5 and locate the folder containing
spat5.hoa.encoder~,spat5.hoa.decoder~, andspat5.virtualspeakers~. - Place
spat_bridge.pyin the Praat AudioTools script folder. - Select exactly one mono or stereo Sound.
- Choose whether a stereo input is summed to mono or preserved as two spread sources.
- Choose Horizontal or 3D quality.
- Choose Static or one of the movement trajectories.
- Set azimuth, end azimuth, elevation, and cycles as required by the trajectory.
- Choose HRTF / room settings.
- Leave Headroom on Auto safe render for normal use.
Processing chain
1. HOA encoder
The source is encoded at the current azimuth and elevation. In stereo-preserve mode, left and right become two separate sources positioned symmetrically around the trajectory centre according to Stereo spread.
2. HOA decoder
The HOA field is decoded to a predefined virtual loudspeaker array. HOA order and speaker array are deliberately chosen together rather than exposed as arbitrary combinations.
3. Binaural virtual speakers
The decoded loudspeaker feeds are passed to spat5.virtualspeakers~, which applies the selected HRTF / SOFA data, ITD scaling, and optional room model.
Mono & stereo sources
| Source mode | Behavior |
|---|---|
| Mono | A mono source remains mono. A stereo input is summed to mono before spatial encoding. |
| Stereo: keep L/R | The left and right input channels are preserved as two HOA sources placed on opposite sides of the centre position. |
With stereo preservation, the two source azimuths are:
The stereo pair follows the same trajectory while retaining its internal left/right separation.
Horizontal & 3D quality
| Quality | HOA | Virtual array | Use |
|---|---|---|---|
| Horizontal | Order 1 | 7 full-range speakers, 7.0 | Azimuthal placement and movement around the listener. |
| 3D | Order 2 | 11 full-range speakers, then silent LFE inserted for 7.1.4 | Azimuth plus elevation using a bed ring and four height speakers. |
Horizontal array
The seven virtual speakers are placed at approximately −150°, −90°, −30°, 0°, +30°, +90°, and +150°, all at 0° elevation.
3D array
The same seven-speaker horizontal bed is supplemented by four height speakers at approximately ±45° and ±135° azimuth, all at +45° elevation. The HOA decoder produces 11 full-range feeds; the Python bridge inserts a silent LFE at channel 4 before the 7.1.4 binaural stage.
Movement trajectories
Movement is defined directly in azimuth and elevation. There is no distance or trajectory-radius parameter because the HOA encoder is being used here for direction, not source distance.
| Mode | Behavior | Main controls |
|---|---|---|
| Static | One fixed azimuth / elevation for the complete source. | Azimuth, Elevation |
| Linear sweep | Linear angular interpolation from Azimuth to End azimuth. | Azimuth, End azimuth |
| Rotation | One or more complete 360° rotations beginning at Azimuth. | Azimuth, Cycles |
| Pendulum | Smooth sinusoidal movement between Azimuth and End azimuth. | Azimuth, End azimuth, Cycles |
| Zigzag | Linear back-and-forth triangular motion between the two azimuth limits. | Azimuth, End azimuth, Cycles |
| Wander | Deterministic quasi-random angular motion built from two incommensurate sinusoidal components. | Azimuth, End azimuth, Cycles |
| Rising arc | Linear azimuth sweep while elevation rises from 0 to the requested value and returns to 0. | Azimuth, End azimuth, Elevation |
| Figure-8 | Azimuth oscillates while elevation oscillates at twice the rate. | Azimuth, End azimuth, Elevation, Cycles |
Angles are sampled once per processing chunk and wrapped to the standard ±180° region before being sent to the encoder.
Movement resolution
With Advanced movement settings, the default chunk duration is 0.25 s and the default crossfade is 0.05 s. Shorter chunks make movement finer but increase processing time because every chunk must pass through the complete three-stage Spat chain.
Safe render
The tool analyses all three external-processing stages:
- HOA encoder output
- virtual loudspeaker decoder output
- final binaural output
PCM full-scale samples at any stage are treated as clipping. In Auto safe render, if even one movement chunk clips, all chunks from that pass are discarded and the complete movement is rendered again with 6 dB more input attenuation. This preserves consistent gain throughout the trajectory.
Up to five complete passes can be attempted in automatic mode. Manual pre-gain performs one checked pass.
The source is normally exported as a 24-bit intermediate WAV. If the first external render cannot use that intermediate format, the tool retries with 16-bit WAV.
This checking is one reason moving renders take longer: every chunk is encoded, decoded, binauralized, and measured, and a failed pass may be rendered again in full.
HRTF, ITD & room
| Preset | SOFA/HRTF | Room |
|---|---|---|
| KEMAR / neutral | KEMAR | none |
| KEMAR / hall | KEMAR | hall |
| KEMAR / studio | KEMAR | studio |
| SOFA custom | Value of Sofa file | User-selected Room preset |
ITD percent scales interaural time difference from 0 to 200%. Values outside this range are clamped.
With a custom SOFA dataset, the Room preset may be none, hall, living room, studio, preset1–4, or legacy1–3.
Controls
| Control | Default | Role |
|---|---|---|
| Tools folder | Spat5 tools path | Folder containing the three required Spat5 command-line processors. |
| Source mode | Mono | Sum stereo to mono, or preserve L/R as two spatial sources. |
| Stereo spread | 60° | Angular separation of the preserved stereo pair. |
| Quality | Horizontal | HOA order 1 → 7.0, or HOA order 2 → 7.1.4. |
| Movement | Static | Static placement or one of seven movement trajectories. |
| Azimuth | 0° | Static position, trajectory start, or trajectory centre depending on mode. |
| End azimuth | 90° | Trajectory destination / range for relevant modes. |
| Elevation | 0° | Static elevation or vertical extent for 3D movement. |
| Cycles | 1 | Number of rotations / swings / oscillations for cyclic trajectories. |
| HRTF preset | KEMAR / neutral | Select KEMAR or custom SOFA rendering. |
| Sofa file | kemar | Custom SOFA dataset name. |
| ITD percent | 100 | Interaural time-difference scaling. |
| Room preset | none | Room model used with Custom SOFA. |
| Headroom | Auto safe render | Automatic re-rendering or one-pass manual gain. |
| Manual pre-gain | −9 dB | Requested input gain in Manual mode. |
| Normalise output | On | Scale a clean assembled result to the requested output peak. |
| Output peak | −1 dBFS | Final normalization target; values are constrained to −24…0 dBFS. |
| Advanced movement settings | Off | Expose chunk duration and crossfade. |
| Draw visualization | On | Create the AudioTools spatial / level diagnostic figure. |
| Play result | On | Play an accepted clean result. |
Visualization
The Picture-window report combines spatial and level information:
- A — Top-down map: virtual speaker positions and the source path. Height speakers appear on an inner projected ring.
- B — Position per chunk: separate azimuth and elevation tracks over source time.
- C — Binaural output: left and right ear waveforms at their true final level with ±1 full-scale guides.
- D — Safe render: render passes, input attenuation, clipped stages, and the accepted pass.
- Level ledger: source peak, input attenuation, assembled render peak, normalization, output peak, and output length.
- Summary strip: HOA order, virtual array, HRTF, ITD, room, movement resolution, bit depth, and descriptive L/R correlation.
Output & timing
Static rendering produces a stereo Sound named approximately:
Moving renders append the trajectory name, for example:
Movement chunks overlap through crossfades. Internal chunk tails are discarded when the next chunk takes over, while a genuine room tail from the final chunk may extend the output beyond the source duration.
The Info window reports a level ledger including source peak, accepted input attenuation, number of safe-render passes, intermediate bit depth, render peak, normalization, final peak, total output length, and L/R correlation.
Practical notes
- Direction, not distance: the movement model controls azimuth and elevation. It does not simulate changing source distance.
- Horizontal quality: elevation is flattened to 0°. Rising Arc and Figure-8 retain only their azimuth component in this mode.
- 3D lower hemisphere: the 7.1.4 virtual array has no dedicated speakers below the listener, so negative elevation is an HOA approximation through the available array.
- Room during movement: room processing is performed per chunk. Shorter chunks improve directional motion but increase the number of independent room renders.
- Processing time: movement can be substantially slower than static rendering because every chunk passes through three external Spat processors and stage-by-stage clipping analysis.
- Correlation: L/R correlation is diagnostic only. A high value is not automatically a binaural error.
Troubleshooting
Spat5 processor not found
Set Tools folder to the directory containing all three required Spat5 command-line processors.
Python not found
The script checks common Python 3 commands. Python must be available on the system PATH. NumPy is optional and accelerates WAV analysis when installed.
The moving render is very slow
Increase Chunk duration in Advanced movement settings. This reduces the number of encoder → decoder → binaural operations, at the cost of coarser movement.
Movement sounds stepped
Reduce Chunk duration. A smaller value gives more spatial updates per second. Crossfade can also be increased modestly to smooth transitions.
The result clips or the script performs several passes
This is the Safe Render system working as intended. A clipped pass is rejected and the whole trajectory is rendered again with 6 dB more attenuation.
Elevation has no effect
Check that Quality = 3D. Horizontal quality uses only the seven-speaker horizontal array and fixes elevation to 0°.
Stereo input collapses to one source
Choose Source mode = Stereo: keep L/R, spread around the position. The default Mono mode intentionally sums a stereo input before encoding.
Dependencies
- Praat
- IRCAM Spat5 command-line tools:
spat5.hoa.encoder~,spat5.hoa.decoder~,spat5.virtualspeakers~ - Python 3
- NumPy is optional and accelerates WAV analysis when available