8-Channel Speech-Driven Spatialization — User Guide

Maps detected pitch to azimuth around an octophonic speaker ring and maps intensity to a proximity-gain control. The active direction is rendered with adjacent-speaker constant-power panning, supported by a low coherent all-speaker bed.

Author: Shai Cohen Affiliation: Department of Music, Bar-Ilan University, Israel Version: 0.6.1 (2026) License: MIT License Category: Spatial Audio / Analysis-Driven Processing Repo: Praat AudioTools
Contents:

What this does

The script analyzes one source Sound frame by frame. Pitch controls angular position around a fixed eight-speaker ring, while intensity controls an amplitude multiplier called proximity gain. At every control frame the pitch-derived angle is panned between the two adjacent loudspeakers. A user-controlled coherent bed is added beneath the directional pan, all eight gains are renormalized together, and the proximity gain scales the resulting field.

What is “speech-driven” here?

The control signals are Praat pitch and intensity analyses, which make the tool particularly natural for speech and voice. The script does not classify phonemes, words, prosody categories, or linguistic content. Any source can be processed; if no voiced pitch is detected, the azimuth is held at the centre of the selected pitch arc while intensity continues to control gain.

Quick start

  1. Select exactly one Sound in Praat.
  2. Run 8-Channel_Speech-Driven_Spatialization.praat.
  3. Choose a Preset. The default is Custom.
  4. For consistent pitch-to-position behavior across recordings, leave Pitch_mapping = Fixed.
  5. Adjust Min_proximity_gain, Max_proximity_gain, and Ambient_level if needed.
  6. Choose the required Output_format.
  7. Leave Draw_visualization on to inspect the mapping and resulting motion.
  8. Click OK.
Default mapping: 75 Hz maps to 225° and 600 Hz maps clockwise to 45°. Intensity maps from 0.2 to 1.0 proximity gain, using the file's 5th–95th percentile intensity range. The default coherent bed is 0.01.

Speaker geometry

The listener is at the origin. The speaker ring uses y upward/front, x rightward, angle 0° at Front, and increasing angle clockwise.

ChannelLabelAngleCartesian role
1FL315°Front-left diagonal
2FFront
3FR45°Front-right diagonal
4R90°Right
5BR135°Back-right diagonal
6B180°Back
7BL225°Back-left diagonal
8L270°Left
For speaker angle a: x = sin(a) y = cos(a)

The same speaker coordinates are used by the octophonic renderer, the geometric stereo fold-down, the four-channel fold-down, and the visualization.

Analysis pipeline

Working source

Exactly one Sound is required. Multichannel input is converted to mono before analysis and rendering. If the selected Sound has a non-zero start time, the working copy is re-extracted so that its analysis and AmplitudeTier domains begin at time 0.

Multichannel note: the mono conversion is Praat's ordinary channel averaging. There is no cancellation-safe strongest-channel fallback, so strongly anti-correlated channels can reduce the analysis signal.

Pitch

To Pitch: time step = Time_step floor = Pitch_floor ceiling = Pitch_ceiling

The script also measures the file's observed pitch minimum, maximum, and mean. If no voiced frames exist, those statistics are undefined; the script then substitutes the centre of the requested pitch range and uses a fixed centre-of-arc azimuth.

Intensity

To Intensity: minimum periodicity = Intensity_floor time step = Time_step If Intensity_floor ≤ 0: minimum periodicity = Pitch_floor effective analysis window ≈ 3.2 / minimum_periodicity

Intensity is normalized using the 5th and 95th percentiles rather than the absolute minimum and maximum. If the percentile range is unavailable or degenerate, the script falls back to the raw extrema.

Control frames

frameShift = Time_step numberOfFrames = floor(duration / frameShift)

The source must be at least one time step long. Pitch and intensity are sampled at each control frame. The resulting channel gains are written to eight AmplitudeTiers, which interpolate linearly between those points.

Pitch → azimuth

Fixed mapping — default

Fixed mapping normalizes pitch against the explicit Pitch_floor and Pitch_ceiling. Values outside the range are clipped. This means the same pitch is mapped to the same azimuth in different files.

pitchNorm = (pitch - Pitch_floor) / (Pitch_ceiling - Pitch_floor) pitchNorm is clipped to 0 ... 1 angleRange = clockwise arc from Low_pitch_angle to High_pitch_angle targetAngle = Low_pitch_angle + pitchNorm × angleRange

Adaptive mapping

Adaptive mode uses the observed minimum and maximum pitch of the current file. Whatever pitch range that recording contains is stretched across the complete selected angular arc. It therefore emphasizes within-file contour rather than preserving a stable pitch-to-angle calibration across sources.

pitchNorm = (pitch - observed_minimum) / (observed_maximum - observed_minimum)

Unvoiced frames

After a valid pitch has appeared, unvoiced frames retain the last valid pitch. Before the first voiced frame, there is no previous value to hold, so the file's mean detected pitch is used. If the entire file has no voiced frame, the position is held at the midpoint of the angular arc.

Angular direction: mapping always follows the clockwise arc from the low-pitch angle to the high-pitch angle. With the default 225° → 45° mapping, the 180° arc passes through 270°, 315°, 0°, then 45°.

Intensity → proximity gain

Intensity is converted to a normalized value using the 5th–95th percentile range, then interpolated between the minimum and maximum proximity-gain settings.

intensityNorm = (intensity - P05) / (P95 - P05) intensityNorm is clipped to 0 ... 1 proximityGain = Min_proximity_gain + intensityNorm × (Max_proximity_gain - Min_proximity_gain)

What does “proximity gain” mean?

It is an amplitude cue only. The script contains no metres, inverse-distance law, propagation delay, air attenuation, early/late reflection model, or direct-to-reverberant ratio. The visualization draws louder states nearer the listener as a visual metaphor for this gain, not as a physical source-distance calculation.

The source already contains its original dynamics. Multiplying it by a gain derived from the same intensity therefore tends to expand dynamic contrast: louder moments receive a larger multiplier and quieter moments receive a smaller multiplier. Narrowing the proximity-gain range reduces this effect.

Equal values: if Max_proximity_gain is entered less than or equal to Min_proximity_gain, the script internally sets it to Min + 0.001. This makes the gain variation extremely small, but not mathematically zero.

Panning & coherent ambient bed

Adjacent-speaker selection

For each target azimuth, the nearest loudspeaker is found by circular angular distance. The sign of the wrapped angular offset then selects the neighboring speaker on the correct side, including the 0°/360° boundary.

Constant-power pair

p = angular distance from nearest speaker / angular distance between the two adjacent speakers θ = p × π/2 main gain = cos(θ) adjacent gain = sin(θ) main² + adjacent² = 1

The sine/cosine law reaches the endpoints smoothly. This replaces a square-root law whose slope became singular at exact speaker positions.

Ambient bed

Ambient_level is used as a base value on all eight channels. The two active pan gains are added on top of that base. The complete eight-channel vector is then normalized together before proximity gain is applied.

for every channel i: raw[i] = Ambient_level raw[main] += cos(θ) raw[adjacent] += sin(θ) norm = sqrt(Σ raw[i]²) gain[i] = raw[i] / norm × proximityGain

At each control frame this guarantees:

Σ gain[i]² = proximityGain²
The bed is coherent, not diffuse. It consists of synchronous copies of the same mono source. There is no decorrelation, delay, reverb, random phase, or diffuse-field simulation.

Between control frames

The constant-power identity is exact at the calculated control frames. Praat then linearly interpolates each channel's AmplitudeTier independently, so the summed power can dip slightly between frames. Faster movement therefore benefits from a smaller Time_step. The script report gives reference examples of approximately -0.03 dB at 4.5° per frame and -0.67 dB at 22.5° per frame.

Presets

Presets replace only the pitch floor, pitch ceiling, and low/high angular endpoints shown below. Other controls—including Fixed/Adaptive mapping, proximity gain, ambient level, time step, and output format—remain as set in the form.

PresetPitch rangeLow pitch angleHigh pitch angleEffect
CustomForm valuesForm valueForm valueNo pitch fields are overridden.
Full Range75–600 Hz225°45°Broad default speech/voice range.
Voice Range100–300 Hz225°45°Narrower pitch calibration.
Narrow Range150–250 Hz225°45°Expands a narrow band across the selected arc in Fixed mode.
Extended Range50–800 Hz225°45°Wider detector and mapping range.
Inverted75–600 Hz45°225°Reverses the default pitch-to-space direction.

Parameters

ParameterDefaultActual role
PresetCustomSelects one of the pitch-range/angle mappings above.
Pitch_floor75 HzPitch detector floor and Fixed-mode mapping minimum.
Pitch_ceiling600 HzPitch detector ceiling and Fixed-mode mapping maximum; must exceed Pitch_floor.
Pitch_mappingFixedFixed floor/ceiling calibration or Adaptive observed-range mapping.
Low_pitch_angle225°Azimuth assigned to normalized pitch 0.
High_pitch_angle45°Azimuth assigned to normalized pitch 1, following the clockwise arc.
Min_proximity_gain0.2Gain at/below the 5th-percentile intensity; negative values are clamped to 0.
Max_proximity_gain1.0Gain at/above the 95th-percentile intensity. If ≤ minimum, it becomes minimum + 0.001.
Ambient_level0.01Coherent base added to all eight channels before renormalization; clamped to 0–1.
Time_step0.01 sPitch/intensity sampling interval and spatial-control interval.
Intensity_floor0Minimum periodicity for Intensity analysis. 0 or less follows Pitch_floor.
Output_format8-channel octophonicSelects the returned routing layout.
Scale_peak0.95Target of the shared eight-channel gain stage; invalid values reset to 0.95.
Draw_visualizationonDraws the v0.6.1 analysis/process figure.
Play_resultonPlays the output, or a temporary geometric stereo monitor for multi-object stem formats.

Output formats

Shared gain before routing

After the eight AmplitudeTier-processed channels are created, the largest absolute peak across all eight is measured. Unless all channels are silent, one common gain is applied to every channel:

peakAll = max(peak Ch1 ... peak Ch8) sharedGain = Scale_peak / peakAll all Ch1 ... Ch8 *= sharedGain

This preserves inter-channel level relationships. The factor may attenuate or boost the complete bank. If the bank is effectively silent, the normalization stage is skipped.

FormatReturned objectsRoutingSecond normalization
8 channels — octophonic1 × 8-channelout1–out8 = Ch1–Ch8No
4 opposing stereo pairs4 × stereoCh1|Ch5, Ch2|Ch6, Ch3|Ch7, Ch4|Ch8No
2 quadraphonic groups2 × 4-channelDiagonal = Ch1,3,5,7; Cardinal = Ch2,4,6,8No
4-channel fold-down1 × 4-channelFL, FR, BR, BL with cardinals split equally to neighboring cornersPeak-scaled to Scale_peak
Stereo fold-down1 × stereoEvery speaker is equal-power panned from its x coordinatePeak-scaled to Scale_peak

Four-channel fold-down

FL = Ch1 + 0.7071 × (Ch2 + Ch8) FR = Ch3 + 0.7071 × (Ch2 + Ch4) BR = Ch5 + 0.7071 × (Ch4 + Ch6) BL = Ch7 + 0.7071 × (Ch6 + Ch8)

Stereo fold-down

For each speaker, its x coordinate determines a constant-power stereo position:

p = speaker_x, clipped to -1 ... +1 a = (p + 1) × π/4 L = cos(a) R = sin(a)

This preserves the left/right geometry of the octagon but necessarily discards front/back distinction.

Playback of stem formats

When the selected format returns four stereo pairs or two quad groups, the script creates a temporary stereo preview using the geometric stereo fold-down above, peak-scales it, plays it, and removes it. The preview is not one of the returned output objects.

Visualization

The current figure uses an 8 × 8 canvas and reads the same pitch, intensity/proximity, and working output channels used by the DSP.

TITLE • source, preset • pitch-analysis range • Fixed / Adaptive mapping • pitch-angle endpoints • output format PANEL A — Speaker map & path • octophonic speaker ring and listener • pitch controls trajectory angle • displayed radius follows proximity gain: high gain is drawn nearer the listener low gain is drawn farther away • this radius is a visual amplitude cue, not physical distance • start point shown separately PANEL B — Pitch contour • time-domain pitch trace • Fixed mode uses Pitch_floor / Pitch_ceiling as plot range • Adaptive mode uses the file's observed range • dotted lines show the range used by the mapping PANEL C — Proximity gain • gain trace between Min_proximity_gain and Max_proximity_gain • dotted reference lines at the configured limits • explicitly labelled as amplitude, not distance PANEL D — Opposing output examples • blue = Ch2 Front • orange = Ch6 Back • one shared amplitude scale • drawn from the working spatial channels before output-format cleanup PANEL E — Summary • source, preset, duration • frame count and Time_step • intensity analysis floor • pitch and intensity ranges • coherent-bed setting • output format, object count, channel count and routing
Trajectory radius: the figure uses a normalized visual radius from approximately 0.88 at minimum proximity gain to 0.38 at maximum gain. That radius has no role in the audio panning calculation.

Implementation notes & limitations