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.
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.
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.
- Pitch → azimuth: fixed floor/ceiling mapping by default, with an optional adaptive per-file mapping.
- Intensity → proximity gain: normalized between the file's 5th and 95th intensity percentiles.
- Adjacent-speaker pan: cosine/sine constant-power law between neighboring speakers.
- Coherent bed: the same signal is present at low level in all eight speakers before renormalization.
- Five output layouts: octophonic, opposing stereo stems, two quad groups, four-channel fold-down, or stereo fold-down.
- Suite-style visualization: octagon trajectory, pitch contour, proximity-gain contour, opposing output examples, and summary.
Quick start
- Select exactly one Sound in Praat.
- Run
8-Channel_Speech-Driven_Spatialization.praat. - Choose a Preset. The default is Custom.
- For consistent pitch-to-position behavior across recordings, leave Pitch_mapping = Fixed.
- Adjust Min_proximity_gain, Max_proximity_gain, and Ambient_level if needed.
- Choose the required Output_format.
- Leave Draw_visualization on to inspect the mapping and resulting motion.
- Click OK.
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.
| Channel | Label | Angle | Cartesian role |
|---|---|---|---|
| 1 | FL | 315° | Front-left diagonal |
| 2 | F | 0° | Front |
| 3 | FR | 45° | Front-right diagonal |
| 4 | R | 90° | Right |
| 5 | BR | 135° | Back-right diagonal |
| 6 | B | 180° | Back |
| 7 | BL | 225° | Back-left diagonal |
| 8 | L | 270° | Left |
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.
Pitch
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
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
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.
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.
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.
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.
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.
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
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.
At each control frame this guarantees:
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.
| Preset | Pitch range | Low pitch angle | High pitch angle | Effect |
|---|---|---|---|---|
| Custom | Form values | Form value | Form value | No pitch fields are overridden. |
| Full Range | 75–600 Hz | 225° | 45° | Broad default speech/voice range. |
| Voice Range | 100–300 Hz | 225° | 45° | Narrower pitch calibration. |
| Narrow Range | 150–250 Hz | 225° | 45° | Expands a narrow band across the selected arc in Fixed mode. |
| Extended Range | 50–800 Hz | 225° | 45° | Wider detector and mapping range. |
| Inverted | 75–600 Hz | 45° | 225° | Reverses the default pitch-to-space direction. |
Parameters
| Parameter | Default | Actual role |
|---|---|---|
| Preset | Custom | Selects one of the pitch-range/angle mappings above. |
| Pitch_floor | 75 Hz | Pitch detector floor and Fixed-mode mapping minimum. |
| Pitch_ceiling | 600 Hz | Pitch detector ceiling and Fixed-mode mapping maximum; must exceed Pitch_floor. |
| Pitch_mapping | Fixed | Fixed floor/ceiling calibration or Adaptive observed-range mapping. |
| Low_pitch_angle | 225° | Azimuth assigned to normalized pitch 0. |
| High_pitch_angle | 45° | Azimuth assigned to normalized pitch 1, following the clockwise arc. |
| Min_proximity_gain | 0.2 | Gain at/below the 5th-percentile intensity; negative values are clamped to 0. |
| Max_proximity_gain | 1.0 | Gain at/above the 95th-percentile intensity. If ≤ minimum, it becomes minimum + 0.001. |
| Ambient_level | 0.01 | Coherent base added to all eight channels before renormalization; clamped to 0–1. |
| Time_step | 0.01 s | Pitch/intensity sampling interval and spatial-control interval. |
| Intensity_floor | 0 | Minimum periodicity for Intensity analysis. 0 or less follows Pitch_floor. |
| Output_format | 8-channel octophonic | Selects the returned routing layout. |
| Scale_peak | 0.95 | Target of the shared eight-channel gain stage; invalid values reset to 0.95. |
| Draw_visualization | on | Draws the v0.6.1 analysis/process figure. |
| Play_result | on | Plays 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:
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.
| Format | Returned objects | Routing | Second normalization |
|---|---|---|---|
| 8 channels — octophonic | 1 × 8-channel | out1–out8 = Ch1–Ch8 | No |
| 4 opposing stereo pairs | 4 × stereo | Ch1|Ch5, Ch2|Ch6, Ch3|Ch7, Ch4|Ch8 | No |
| 2 quadraphonic groups | 2 × 4-channel | Diagonal = Ch1,3,5,7; Cardinal = Ch2,4,6,8 | No |
| 4-channel fold-down | 1 × 4-channel | FL, FR, BR, BL with cardinals split equally to neighboring corners | Peak-scaled to Scale_peak |
| Stereo fold-down | 1 × stereo | Every speaker is equal-power panned from its x coordinate | Peak-scaled to Scale_peak |
Four-channel fold-down
Stereo fold-down
For each speaker, its x coordinate determines a constant-power stereo position:
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.
Implementation notes & limitations
- Version label: the script's top header still says 0.6, while its v0.6.1 changelog, Info report, and visualization fixes identify the current implementation as v0.6.1. This guide follows the latter.
- One source only: the script checks the selection before displaying its form.
- Source duration: sources shorter than one
Time_stepare rejected. - Mono-derived field: original multichannel spatial information is not preserved.
- No voiced pitch: the angular position remains at the arc centre; intensity can still modulate proximity gain.
- Percentiles are robust, not immune to silence: they reduce sensitivity to isolated extremes, but enough silent material can still enter the lower percentile.
- Intensity is reused as gain: proximity gain deliberately exaggerates source dynamics because it multiplies audio whose amplitude already reflects those dynamics.
- Bed semantics: the current DSP places the coherent base on all eight channels, including the two active channels, then adds the directional pan and renormalizes. An older Info sentence still calls it a bed on the six non-active channels; this guide documents the actual v0.6.1 code.
- Constant power: exact at analysis/control frames; slightly approximate between frames because the eight AmplitudeTiers interpolate independently.
- No acoustic distance simulation: no propagation delay, inverse-distance attenuation, HRTF, room model, or reverberation is calculated.