22.2 Synthetic Stem Renderer — v1.1.1 User Guide

Creates a 24-channel synthetic 22.2-style stem field from one mono or stereo source, with an optional stereo headphone render. The main engine is pure Praat; the experimental binaural mode additionally uses locally stored CNMAT KEMAR HRIR WAV files.

Author: Shai Cohen Affiliation: Department of Music, Bar-Ilan University, Israel Version: 1.1.1 License: MIT License Repo: GitHub
Contents:

What this does

22.2 Synthetic Stem Renderer takes exactly one mono or stereo Sound and derives a 24-channel multichannel field organized as 10 middle-layer channels, 9 upper-layer channels, 3 lower-layer channels, and 2 LFE channels. It is a signal-processing approximation inspired by a 22.2-style loudspeaker layout; it is not a physical scene reconstruction, decoder, or measured-room renderer.

Core behavior:
  • Stereo input keeps the original left and right channels as the direct FL/FR anchors before final shared normalization.
  • Mono input creates a widened front pair by delaying the right copy by Front_width_ms.
  • Center, lateral residuals, wides, surround, upper, lower, and LFE stems are derived deterministically from the front pair.
  • Surround, upper, lower, and LFE roles use fixed filtering, delays, and preset-dependent gains.
  • The 24-channel array and headphone output can be rendered independently or together.
  • The optional binaural mode convolves only the speaker channels for which the script contains verified local HRIR mappings.

Quick start

  1. Select exactly one mono or stereo Sound.
  2. Run 22_2_Stem_Renderer.praat.
  3. Choose one of the three presets: Cinematic Film, Subtle Music, or Wide Mono.
  4. For mono input, set Front_width_ms. The default is 0.35 ms.
  5. Enable the 24-channel render, the headphone render, or both. At least one output must be enabled.
  6. If rendering headphones, choose Headphone Fold-down (Clean) or True Binaural (CNMAT KEMAR).
  7. For binaural mode, point Hrir_folder to the folder containing the required HRIR WAV files.
  8. Set Headroom_dBFS, then run the script.
Output names: the multichannel render is named <source>_22_2_Array. The headphone output is named <source>_Headphone_Preview or <source>_True_Binaural.

Presets

The current form contains three presets only. There is no Custom preset. A preset sets the center reinforcement, wide/ambience/upper/lower gains, side delay, and upper delay. The fixed decorrelation and filter frequencies remain the same for all presets.

Preset FC reinforce Wide Amb / Rear Upper Lower Side delay Upper delay
Cinematic Film0.50-6 dB-4 dB-6 dB-9 dB40 ms30 ms
Subtle Music0.30-10 dB-8 dB-12 dB-18 dB25 ms15 ms
Wide Mono0.40-9 dB-6 dB-9 dB-12 dB35 ms25 ms
Fixed for all presets: decorr_ms = 7 ms rear HP / LP = 120 / 6000 Hz upper HP / LP = 250 / 4000 Hz lower HP / LP = 300 / 3000 Hz LFE band = 20 / 120 Hz

24-channel layout

Middle Layer — 10 channels
1. FL — Front Left
2. FR — Front Right
3. FC — Front Center
4. FWL — Front Wide Left
5. FWR — Front Wide Right
6. SiL — Side Left
7. SiR — Side Right
8. BL — Back Left
9. BR — Back Right
10. BC — Back Center

Upper Layer — 9 channels
11. TpFL — Top Front Left
12. TpFR — Top Front Right
13. TpFC — Top Front Center
14. TpSiL — Top Side Left
15. TpSiR — Top Side Right
16. TpBL — Top Back Left
17. TpBR — Top Back Right
18. TpBC — Top Back Center
19. TpC — Top Center

Lower Layer — 3 channels
20. BFL — Bottom Front Left
21. BFR — Bottom Front Right
22. BFC — Bottom Front Center

LFE — 2 channels
23. LFE1
24. LFE2

Processing pipeline

1. Front pair

With stereo input, channel 1 is copied to stem_L and channel 2 to stem_R. With mono input, two copies are made and the right copy is delayed by a sample-quantized version of Front_width_ms. The delayed copy is trimmed back to the original duration.

Mono widening: widthSamples = round(Front_width_ms / 1000 × sampleRate) actual delay = widthSamples / sampleRate FL = original FR = delayed original, trimmed to source duration

2. Base stems

Mid = (L + R) / 2 FC = Mid × c_reinforce Amb_L = L - 0.5 × R Amb_R = R - 0.5 × L FW_L = 0.6 × FL + 0.6 × Amb_L FW_R = 0.6 × FR + 0.6 × Amb_R

The ambience signals are therefore lateral residuals, not a conventional pure Side signal (L-R)/2. The front wides blend direct front content with those residuals.

3. Channel builder

Each of the 24 output channels is copied from one base stem and can then receive a Hann-band filter, a fixed delay, and a linear gain converted from dB. Delays are implemented by prepending silence and trimming back to the source duration, so every stem remains the same duration.

Channel derivation

ChannelsBaseFilteringDelayGain
FL / FRDirect frontsFull band00 dB
FCMid × center reinforcementFull band00 dB builder gain
FWL / FWRDirect + lateral residual blendFull band5 / 12 msPreset Wide gain
SiL / SiRAmb_L / Amb_R120–6000 HzSide / Side+7 msPreset Amb gain
BL / BRAmb_L / Amb_R120–6000 HzSide+10 / Side+17 msPreset Amb gain
BCMid120–6000 HzSide+15 msAmb gain −3 dB
TpFL / TpFRFL / FR250–4000 HzUpper / Upper+7 msPreset Upper gain
TpFCFC250–4000 HzUpper+5 msUpper gain −3 dB
TpSiL / TpSiRAmb_L / Amb_R250–4000 HzUpper+Side / +7 msPreset Upper gain
TpBL / TpBRAmb_L / Amb_R250–4000 HzUpper+Side+10 / +17 msPreset Upper gain
TpBCMid250–4000 HzUpper+Side+15 msUpper gain −3 dB
TpCMid250–4000 HzUpper+25 msUpper gain −3 dB
BFL / BFRFL / FR300–3000 Hz4 / 11 msPreset Lower gain
BFCFC300–3000 Hz7.5 msLower gain −3 dB
LFE1 / LFE2Mid20–120 Hz00 dB
Gain-column interpretation: these are the gains applied by the channel-builder stage. They are not complete measured output levels. Some base stems already contain scaling—for example FC includes c_reinforce and the wide stems contain the 0.6/0.6 matrix blend.

Headphone modes

Headphone Fold-down (Clean)

This is intentionally a front-oriented reference rather than a fold-down of all 24 stems:

Left = FL + 0.707 × (0.10 × FC) Right = FR + 0.707 × (0.10 × FC)

No side, rear, upper, lower, or LFE channels enter this headphone preview. The result is then peak-scaled once to the requested headroom.

True Binaural (CNMAT KEMAR) — experimental mode

This is the script's menu name. The current implementation does not binauralize all 24 channels: it uses the 14 speaker positions for which explicit KEMAR left/right HRIR mappings are present in the script.

Mapped channelsContribution scale before ear sum
FL, FR1.00
FC0.12
SiL, SiR0.10
BL, BR0.08
TpFL, TpFR0.06
TpSiL, TpSiR0.05
TpBL, TpBR0.04
TpC0.03

FWL/FWR, BC, TpFC, TpBC, the three lower channels, and both LFE channels are not included in the current binaural map.

HRIR handling

Each mapped output stem is convolved separately with its mapped left-ear and right-ear HRIR. HRIRs are resampled to the source sample rate when required; if an HRIR file is multichannel, only its first channel is used.

Missing files: the folder and one test HRIR are checked before processing. During binaural rendering every mapped pair is checked. If any required mapped pair is missing, the headphone render is aborted and no partial binaural Sound is returned. A separately requested 24-channel render can still be produced.

Parameters & defaults

ParameterDefaultActual role
PresetCinematic FilmSelects one of the three fixed macro-control sets.
Front_width_ms0.35 msMono input only. Requested right-front delay; quantized to the nearest sample. The form requires a positive value and the script has no explicit upper clamp.
Render_22_2_outputyesReturns the 24-channel Sound.
Render_headphone_outputyesReturns the selected stereo headphone render.
Headphone_modeFold-down (Clean)Front-oriented clean preview or mapped KEMAR convolution.
Hrir_folderKemar_HRIR/Folder used only when binaural headphone rendering is requested. A trailing slash is added automatically if needed.
Headroom_dBFS-1.0 dBFSPeak target for each final returned object. Values above 0 are treated as 0 dBFS.
Draw_visualizationyesDraws the current v1.1.1 multi-panel process figure.
Play_headphone_resultyesPlays the final headphone object if one was successfully rendered. It does not play the 24-channel array.

Final level handling

The current implementation does not peak-normalize every derived stem independently. The internal channel relationships are preserved until the final output object is built.

24-channel output

rawPeak24 = absolute peak of the combined 24-channel Sound target = 10^(min(Headroom_dBFS, 0) / 20) gain24 = target / rawPeak24 all 24 channels are multiplied by the same gain24

Headphone output

The completed stereo headphone object is measured separately and receives one common stereo gain to the same headroom target.

Normalization can boost as well as attenuate. It is a target-peak normalization, not an attenuation-only safety limiter.

Visualization v1.1.1

The current figure is a process overview rather than a measurement of a physical 22.2 room.

TITLE source | mono/stereo input | preset | duration PANEL A — 24-channel dome map three visual elevation layers + two LFE markers listener at centre dot sizes represent broad role/preset gain settings not measured acoustic distance or measured loudness PANEL B — Signal-routing flow input → base stems → output groups PANEL C — 24 builder gain / delay rows bar = channel-builder linear gain dot = configured delay does not include every gain already embedded in the base stem PANEL D — Output waveform if headphone exists: left/right headphone channels otherwise: FL/FR from the 24-channel array PANEL E — Summary preset, source, sample rate, duration Wide / Amb / Upper / Lower macro gains side / upper / decorrelation delays headroom ceiling
About the dome drawing: it is a schematic layer map. The script does not calculate speaker coordinates, propagation paths, room acoustics, HRTFs for the 24-channel main render, or listener-dependent localization.

Implementation notes & limitations