Stereo Panorama Mixer — User Guide
Distributes one or more selected Sounds across a configurable stereo field, with six presets, three source-order strategies, three panning laws, automatic sample-rate matching, output peak scaling, and suite-standard spatial visualisation.
What this does
Stereo Panorama Mixer creates one stereo mix from the selected Sound objects. Each source receives a target pan position, the position is converted to left/right gains according to the selected panning law, and the panned signals are accumulated into a stereo canvas whose duration matches the longest source.
selected Sounds
→ choose preset / width / ordering / pan law
→ first selected Sound defines output sample rate
→ resample mismatched sources when necessary
→ assign pan position to every source
→ derive L/R gains from selected pan law
→ mix each source from time 0 for its own duration
→ scale completed stereo mix to Output_peak
→ optional visualisation and playback
N-1.
Preserve balance (pan each input channel), but in the current v0.4 code the extracted left and right channels are averaged together before the pan gains are applied. For an ordinary stereo source this is effectively a fold-to-mono operation, so the original L/R balance is not actually preserved. The explicit Fold to mono mode therefore produces essentially the same spatial input signal. This is an implementation issue in the script rather than a documentation convention.
Quick start
- In Praat, select one or more Sound objects.
- Run script… →
Distribute_sounds_in_stereo_field.praat. - Choose a Preset, or select Custom and set Pan_width and Order manually.
- Choose a Pan_law.
- Choose the stereo-input handling mode. See the implementation warning above for the current behaviour of Preserve balance.
- Set the desired Output_peak.
- Enable or disable Draw_visualization and Play_result, then click OK.
Presets & ordering
Custom
Uses the values entered for Pan_width and Order.
Even Spread
Full stereo width (1.0) in Forward order.
Headphone-Friendly
80% stereo width (0.8) in Forward order, avoiding the hardest extremes.
Cluster Center
40% stereo width (0.4) in Forward order for a compact central image.
Reverse Order
Full stereo width with the selected sources assigned right-to-left.
Spread from Center
Full width using the Center-out source-order strategy.
Pan positions
For more than one source, output slots are evenly spaced across the full range and then multiplied by Pan_width:
pan = rawPan × Pan_width
Pan_width is clamped to the safe range 0–1. At 1.0, the outermost slots reach hard left and hard right; at 0.4, the same distribution occupies only the central 40% of the stereo range.
Order modes
- Forward: selection order maps left-to-right.
- Reverse: selection order maps right-to-left.
- Center-out: source 1 is assigned nearest the centre, then subsequent sources alternate outward into available slots.
Panning laws
The pan parameter runs from -1 (left) to +1 (right). Internally it is mapped to pos = (pan + 1) / 2.
1. Constant power (square-root)
R = sqrt(pos)
L² + R² = 1
Maintains unit summed squared gain across the field.
2. Linear
R = pos
Simple equal-voltage interpolation. At the centre both gains are 0.5, so summed squared gain is 0.5 rather than 1.
3. -3 dB sin/cos
R = sin(pos × π / 2)
L² + R² = 1
A trigonometric constant-power curve. Like the square-root law it reaches approximately 0.707 per channel at centre, but the curve shape away from centre is different.
Parameters
| Name (GUI) | Type | Default | Description |
|---|---|---|---|
| Preset | option menu | Custom | Six choices: Custom, Even Spread, Headphone-Friendly, Cluster Center, Reverse Order, and Spread from Center. |
| Pan_width | real | 1.0 | Scales the stereo distribution around the centre. Values are clamped to 0–1. Presets may override it. |
| Order | option menu | Forward | Forward, Reverse, or Center-out. Presets may override it. |
| Pan_law | option menu | Constant power (sqrt) | Square-root constant power, Linear, or -3 dB sin/cos. |
| Stereo_input_handling | option menu | Preserve balance | Offers Preserve balance or Fold to mono. In the present v0.4 implementation, Preserve balance also averages channels 1 and 2 before panning; see warning above. |
| Output_peak | real | 0.95 | Target used by Scale peak on the completed stereo mix. |
| Draw_visualization | boolean | 1 | Draws the 8×8 suite-standard diagnostic display. |
| Play_result | boolean | 1 | Plays the final stereo mix after processing. |
Processing details
Output canvas
The first selected Sound defines the output sample rate and the output name base. The canvas is stereo, begins at 0 seconds, and extends to the longest selected duration.
Sample-rate handling
If another selected source has a different sampling frequency, the script reports a warning and resamples that source to the first source's rate using Praat's Resample command before mixing it.
Source duration
Each source contributes from time 0 to its own duration. Shorter sources end naturally while longer sources continue until the maximum output duration.
RMS analysis
Per-source RMS is measured for the visualisation. For mono/folded input it is the RMS of the working mono source. In the nominal Preserve-balance branch it is calculated from the separate input-channel RMS values before those channels are averaged for mixing.
Final gain
After all sources have been accumulated, the complete stereo result is processed with:
Visualisation
Version 0.4 uses the suite-standard 8×8 spatial visualisation. The DSP itself is unchanged by the later visual-standardisation pass.
Stereo field placement
Horizontal L–C–R strip showing each source at its actual pan position. Marker size reflects source RMS; source names and width edges are shown directly on the field.
Pan-law curves
Left and right gain curves across pan position for the selected law, with markers at every source's actual L/R gain pair.
Per-source RMS
RMS bars sorted from left to right, labelled by original source index and pan position.
Output waveform
Final stereo waveform with left in blue and right in orange, plus amplitude and time label rails.
Compact summary
Preset, source count, width, pan law, order, stereo-input mode, output duration and peak, followed by a compact source/pan list.
Outputs
- Object name:
[FirstSourceName]_panMix_[PresetName] - Channels: 2 (stereo).
- Sampling rate: sampling rate of the first selected source.
- Duration: longest selected source.
- Pan positions: determined by source count, order, and pan width.
- Final level: scaled to Output_peak.
- Info window: reports source count, preset, width, order, law, any resampling warnings, each source's pan/L/R gains/RMS, and final output duration and peak.
- Playback: optional via Play_result.
Applications
Sound masses
Rapidly arrange multiple related sounds across a controlled stereo width.
Layered textures
Create a reproducible panorama for drones, granular layers, sustained materials, or environmental recordings.
Rhythmic collections
Separate simultaneous or related attacks spatially without manually assigning every pan value.
Comparative listening
Compare pan laws, stereo widths, and source-order strategies using the same input set.