8-Channel Spatial Movements
Moves one mono-derived source through a fixed octophonic speaker ring, or applies one of six global amplitude envelopes to an evenly distributed centred source. Spatial gains are generated from source-to-speaker distance, normalized to constant power, and rendered as eight gain-controlled channels.
What this does
The script creates eight gain-controlled copies of one working mono source. For the six spatial patterns, a single virtual source follows a 2D trajectory inside an octagonal loudspeaker ring. At each time point, the distance from that source to every speaker determines a Gaussian spatial weight; the eight weights are normalized together before being written to IntensityTiers. For the six global patterns, the source stays at the listener position and all eight channels receive the same global amplitude envelope.
- 12 patterns: 6 global amplitude envelopes and 6 spatial source trajectories.
- One geometry: the same unit-circle speaker coordinates drive the audio, visualization, and downmixes.
- Constant-power spatial stage: the eight spatial gains satisfy Σg² = 1 before any global envelope and before the later shared output gain.
- Adaptive control rate: tier point density rises automatically with the fastest motion component.
- Five output layouts: octophonic, opposing stereo pairs, two quad groups, four-channel fold-down, or stereo fold-down.
- Reproducible random walk: the walk uses a deterministic hash derived from
Random_seed.
Quick start
- Select exactly one Sound.
- Run
8-Channel_Movements.praat. - Choose a Pattern. The default is Circular rotation.
- For a spatial pattern, set Path_radius and Source_focus. Motion_speed is used only by Circular, Figure-8, Random walk, and Spiral.
- Choose an Output_format.
- Leave Draw_visualization on to inspect the actual path and channel gains.
- Click OK.
Speaker geometry
The listener is at the origin and the eight speakers lie on the unit circle. The coordinate system uses y upward/front, x rightward, angle 0° at Front, and increasing angle clockwise.
| Channel | Label | Angle | 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 |
Path_radius is capped at 0.98 so the built-in moving paths remain inside the loudspeaker ring. Custom_x and Custom_y are intentionally not forced inside the ring; an outside position is allowed and reported, although the stereo image cannot localize beyond the array itself.
Patterns
Global envelopes — no spatial movement
Patterns 1–6 hold the virtual source at the listener position. The spatial distribution is therefore even across all eight speakers, while a single envelope scales the complete field.
| Pattern | Active controls | Implementation |
|---|---|---|
| Sine wave | Frequency_hz, Floor_db | Sinusoidal linear-gain envelope between the floor and unity. |
| Fade in | Fadein_time, Floor_db | Linear floor-to-unity fade, then unity. |
| Fade out | Floor_db | Linear unity-to-floor fade over the whole file. |
| Triangle envelope | Floor_db | Floor → unity at mid-file → floor. |
| Constant | Floor_db only | No global attenuation; centred source remains evenly distributed. |
| Exponential decay | Exponent, Floor_db | floor^(u^exponent), normalized to file duration. |
Spatial trajectories
| Pattern | Trajectory | Motion_speed? |
|---|---|---|
| Linear sweep | Straight line from Left to Right at y=0, spanning the complete file. | No. Effective sweep rate is 2r / duration. |
| Circular rotation | Clockwise circle of radius r, starting at Front. | Yes, cycles/s. |
| Figure-8 | Gerono lemniscate: x=r·sin(phase), y=(r/2)·sin(2·phase). | Yes. The second component runs at 2× the motion frequency. |
| Random walk | Momentum-based deterministic pseudo-random walk reflected at radius r, then linearly interpolated between waypoints. | Yes. Waypoint rate = 4× Motion_speed. |
| Spiral | Radius grows linearly from 0 to r while the source rotates clockwise. | Yes, cycles/s. |
| Custom fixed position | Static source at (Custom_x, Custom_y). | No. |
Exact trajectory equations
Spatial gain model
Distance weights
For every control point, squared source-to-speaker distances are calculated. The nearest distance is factored out before evaluating the Gaussian so that very distant or tightly focused positions do not underflow all weights to zero.
Source_focus controls localization width. Higher values concentrate energy more strongly around the nearest speaker or speakers; lower values produce a broader distribution.
Floor and constant-power normalization
Floor_db is converted to a linear bleed floor and applied to the weights before normalization. It is clamped to -120…-6 dB.
At the exact centre all speaker distances are equal, so every channel receives 1/sqrt(8), approximately -9.03 dB.
Global-envelope scaling
After the spatial weights are normalized, the selected global envelope is applied:
Tier resolution
The channel gains are written into eight IntensityTiers, which interpolate linearly between control points. Number_of_points is therefore a minimum, not always the final count.
If the requested point count is too small, the script raises it and reports the change. If the 12,000-point cap is reached, the Info window notes that reducing Motion_speed will permit finer temporal representation.
The Random Walk itself is generated from a fixed set of waypoints determined by duration, speed, and seed, so changing Number_of_points does not generate a different walk; it only changes how densely that path is sampled into the tiers.
Parameters
| Parameter | Default | Actual role |
|---|---|---|
| Pattern | Circular rotation | Selects one of 12 global/spatial behaviours. |
| Motion_speed | 1.0 | Cycles/s for Circular, Figure-8, and Spiral; controls random-walk waypoint rate. Not used by the other patterns. |
| Frequency_hz | 2.0 | Frequency of the global Sine envelope only. |
| Fadein_time | 1.0 s | Duration of the global Fade-in ramp. |
| Exponent | 1.0 | Shape of the normalized Exponential decay. |
| Path_radius | 0.7 | Maximum radius of built-in spatial paths; capped at 0.98. |
| Source_focus | 2.0 | Gaussian distance-weight concentration. |
| Custom_x / Custom_y | 0 / 0 | Static Cartesian source position for Custom only; outside-ring values are allowed. |
| Floor_db | -60 dB | Bleed floor applied to spatial weights before normalization; clamped to -120…-6 dB. |
| Scale_peak | 0.95 | Target for the shared eight-channel gain stage; values above 1 are clamped to 1. |
| Number_of_points | 100 | Minimum tier point count; automatically raised when the motion needs more resolution. |
| Random_seed | 1 | Changes the deterministic Random Walk path. It does not seed Praat's RNG. |
| Output_format | 8-channel octophonic | Selects the returned speaker/stem/downmix layout. |
| Draw_visualization | on | Draws the v0.6 process visualization. |
| Play_result | on | Plays the returned object or a temporary stereo monitor for multi-object stem formats. |
Output formats
Shared-gain stage
After the eight IntensityTier multiplications, the script measures the largest peak found in any of the eight working channels. One common factor is then applied to all channels:
This preserves inter-channel gain relationships. It is a normalization stage and may either attenuate or boost the eight channels. Downmix formats receive an additional final peak normalization after their channel sums are built.
| Format | Returned objects | Routing |
|---|---|---|
| 8 channels — octophonic | 1 × 8-channel | Ch1…Ch8 unchanged in speaker order. |
| 4 opposing stereo pairs | 4 × stereo | Ch1|Ch5, Ch2|Ch6, Ch3|Ch7, Ch4|Ch8. Each stereo object represents an axis through the listener. |
| 2 quadraphonic groups | 2 × 4-channel | Diagonal group = Ch1,3,5,7; cardinal group = Ch2,4,6,8. |
| 4-channel fold-down | 1 × 4-channel | FL, FR, BR, BL. Diagonal speakers feed directly; each cardinal speaker splits at 1/sqrt(2) to its two neighboring corners. |
| Stereo fold-down | 1 × stereo | Each octophonic speaker is equal-power panned according to its x coordinate. Left/right is preserved; front/back is necessarily lost. |
Exact four-channel fold
Stereo preview for stem formats
When the chosen format returns four stereo pairs or two quad groups, Play_result does not play one stem in isolation. The script builds the same geometric stereo fold-down used by the stereo format, peak-normalizes it to Scale_peak, plays it as a temporary monitor, and then deletes the monitor. The actual output stem objects remain selected.
Visualization
The v0.6 figure is generated from the same trajectory and computeGains procedures used by the audio tiers. Its sampling density scales with the fastest motion component, with display-specific caps to keep Picture-window drawing responsive.
Implementation notes
- Exactly one Sound: the script exits before the form if the selection is not exactly one Sound object.
- Multichannel input: inputs with more than one channel are converted to mono before the eight movement channels are created. This is Praat's ordinary mono conversion; no cancellation-safe strongest-channel fallback is used.
- Random walk: despite the parameter name
Random_seed, the script does not call a seedable Praat RNG. It uses a deterministic sine/hash function, so the same seed produces the same walk. - Custom outside the ring: legal and reported. The Gaussian weights still resolve, but the source image cannot extend physically beyond the loudspeaker array.
- Gain floor:
Floor_dbis a spatial bleed floor, not SPL and not a post-normalization channel clamp. - Global patterns: Sine, Fade in/out, Triangle, Constant, and Exponential are amplitude-envelope processes, not movement patterns.
- Absolute level: the constant-power property describes the spatial weighting stage. The later shared normalization deliberately rescales all eight channels together.