Hamasaki Square Ambience — v1.2 User Guide

Psychoacoustic approximation of a Hamasaki Square ambience processor. Takes a mono or stereo input and produces a 4‑channel output in the order: L, R, Ls, Rs. Uses side‑signal extraction, bandpass filtering, symmetric delays, spectral decorrelation, and optional mid‑signal blending to create a natural surround ambience from any source.

Author: Shai Cohen Affiliation: Department of Music, Bar‑Ilan University, Israel Version: 1.2 (2025) License: MIT License Repo: GitHub
Contents:

What this does

Hamasaki Square Ambience is a practical signal‑processing approximation of the Hamasaki Square surround technique (often used in 4‑channel film and ambient mixes). The processor converts a mono or stereo input into a 4‑channel output (L, R, Ls, Rs) where:

Key design decisions (v1.2):
  • Mono front widening now uses a true inter‑channel time difference (ITD): L = original, R = delayed by mono_width_ms. This creates a genuine Haas‑effect width cue.
  • Spectral tilt cutoffs for mono fronts are independent of rear lowpass (now 18 kHz / 15 kHz).
  • Rear channels use symmetrical delays (base ± half decorr offset) and spectral decorrelation (Rs LP cutoff ≈ 85 % of Ls LP) – a gentler, more natural alternative to polarity inversion.
  • Optional mid‑blend ensures rears are audible even for mono‑ish inputs (low side energy).

Quick start

  1. In Praat, select exactly one Sound object (mono or stereo).
  2. Run script…Hamasaki_Square_Ambience.praat.
  3. Choose a Preset:
    • Subtle (−6 dB rear, 20 ms delay), Natural (−9 dB, 30 ms), Spacious (−6 dB, 45 ms), Cinematic (−3 dB, 60 ms), Wide Mono (for mono sources).
  4. For custom mode (preset = Custom), adjust parameters as desired.
  5. Click OK. The script processes the input, creates a 4‑channel Sound object named originalname_HamasakiSq, and optionally plays it.
Tip: For stereo material, Natural is a good starting point. For mono material, use Wide Mono – it applies a small ITD (0.6 ms) to the front channels and blends more mid into the rears. The visualisation shows the speaker layout and parameter bars.
Important: This effect is implemented entirely in Praat – no Python required. The output is a 4‑channel Sound object; Praat can play multichannel sounds, but to hear the full surround effect you need a 4‑channel audio interface or a downmix to stereo (Praat will play only the first two channels by default). Use a multichannel player or DAW for proper monitoring.

The 5 presets (+ Custom)

PresetRear level (dB)Rear delay (ms)Decorr offset (ms)Mono width (ms)Description
Subtle-62050.25
Natural-93070.35
Spacious-645100.40
Cinematic-360120.50
Wide Mono-93580.60

Each preset also sets the bandpass (HP/LP) and mid‑blend levels appropriately.

Processing pipeline

Stereo input:
  1. Front L/R = original left/right channels (unmodified).
  2. Side signal = L – R (diffuse ambience).
  3. Optional: blend in mid signal (L+R) at rear_mid_blend_dB (helps when side energy is low).
  4. Bandpass filter (HP: rear_highpass_Hz, LP: rear_lowpass_Hz).
  5. Ls = filtered rear source, delayed by rear_delay_ms – decorr_offset_ms/2.
  6. Rs = filtered rear source (LP cutoff ×0.85 for spectral decorrelation), delayed by rear_delay_ms + decorr_offset_ms/2.
  7. Apply rear gain.
  8. Concatenate into 4‑channel Sound (L, R, Ls, Rs).
  9. Peak normalise to headroom_dB.
Mono input:
  1. Front L = original, R = original delayed by mono_width_ms (real ITD).
  2. Optional spectral tilt: L LP at 18 kHz, R LP at 15 kHz (decorrelation).
  3. Rear source = original mono (no side signal).
  4. Optional mid‑blend (same signal, but gain‑scaled).
  5. Bandpass filter and symmetric delay as above.
  6. Concatenate into 4‑channel Sound.

The rear channels are high‑passed to remove low‑frequency buildup and low‑passed to create a diffuse, non‑direct sound. The symmetrical delay (± half decorr offset) ensures neither surround leads or lags unnaturally. Spectral decorrelation (different LP cutoffs for Ls and Rs) creates a natural, wide image without polarity inversion artefacts.

Parameters & defaults

Rear channels

ParameterRangeDefaultDescription
Rear_level_dB-24 … 0-9
Rear_delay_ms0–20030
Decorr_offset_ms0–307

Front channels (mono only)

ParameterRangeDefaultDescription
Mono_width_ms0–20.35

Rear mid‑blend

。”。
ParameterRangeDefaultDescription
Rear_mid_blend_dB-12

Bandpass filters

ParameterRangeDefaultDescription
Rear_highpass_Hz20–500120
Rear_lowpass_Hz1000–200006000

Output

。”。
ParameterRangeDefaultDescription
Headroom_dB-1.0
Draw_visualizationyes/noyes
Play_resultyes/noyes

Visualization (Praat picture)

When Draw_visualization = 1, the script draws a 4‑panel figure:

  • Hamasaki Square layout diagram – a 2D top‑down view of the 4 speakers (L, R, Ls, Rs) with a listener at the centre. Dashed lines show the signal flow, and delay annotations are shown next to the rear speakers.
  • Parameter bars – horizontal bars showing rear level, mid blend, rear delay, decorr offset, HP/LP frequencies, and (for mono) mono width.
  • Output waveform overlay – all 4 channels overlaid (blue = L, orange = R, light blue = Ls, light orange = Rs) with separate colours for easy identification.
  • Summary bar – preset name, input type, source name, and key parameter values.
Tip: The speaker diagram helps visualise the Hamasaki Square layout. The parameter bars give an at‑a‑glance summary of the current settings.

FAQ / troubleshooting

Output sounds narrow / rears are quiet

Check Rear_level_dB – it may be set too low (e.g., -12 dB). Increase to -6 dB or -3 dB. Also ensure Rear_mid_blend_dB is not disabled (set to -100). For mono input, the side signal is zero, so mid‑blend is essential – use the Wide Mono preset.

Mono input has no stereo width (front channels)

v1.2 fixed this: L = original, R = delayed by mono_width_ms. This creates a real inter‑channel time difference. The Haas effect works with delays as low as 0.1 ms. Increase Mono_width_ms to 0.5–1.0 ms for a wider image.

Reverb sounds “phasey” / hollow

The spectral decorrelation (different LP cutoffs for Ls and Rs) is much gentler than polarity inversion. If it still sounds phasey, reduce Decorr_offset_ms (less delay difference) or increase Rear_lowpass_Hz (less HF reduction). Also ensure you’re listening in a true 4‑channel environment – downmixing to stereo will collapse the rear channels into the front, causing phase issues.

Why symmetric delays?

Hamasaki Square traditionally uses a single delay for both rears. This implementation keeps the average delay (the centre of the Ls/Rs image) at the same position, while the offset creates decorrelation. This avoids a biased image where one rear leads the other.

Mono widening – why not use a simple delay on one channel?

v1.1 incorrectly delayed both channels equally (no net ITD). v1.2 delays only the right channel, creating a genuine timing difference. Praat cannot advance a signal (only delay it), so the absolute timing shift is irrelevant – only the difference between L and R matters for perceived width.

Headroom parameter

The output is peak‑normalised to the specified headroom (e.g., -1 dBFS = peak at 0.891). This prevents clipping when combining four channels. If your source is very quiet, the gain may be high; the visualisation shows the norm gain factor.