Stereo Mixer — User Guide

Mix 1–8 mono or stereo Sound objects into one stereo output, with per-source left/right gains, preset gain patterns, automatic sample-rate matching, optional peak normalization, and a compact visual summary.

Author: Shai Cohen Version: 0.6.2 (2026) Category: Spatial / Mixing Output: Stereo
Contents:

What this does

Stereo Mixer creates one stereo Sound from 1–8 selected input Sounds. Each source receives an independent left gain and right gain, then all processed sources are summed into a shared stereo buffer.

Output L(t) = Σ [ sourcei,L(t) × gaini,L ]
Output R(t) = Σ [ sourcei,R(t) × gaini,R ]

Mono sources are first converted to stereo, so the same mono signal is available to both sides before the L/R gains are applied. Stereo sources keep their original left and right channels and those two channels are weighted independently.

Mono versus stereo semantics: for a mono source, L/R gains behave like a simple amplitude-based stereo placement. For a stereo source, they are left/right channel weighting, not point-source panning: material that exists only in the original right channel is not transferred into the left channel, and vice versa.

The script accepts mono and stereo inputs only. A source with 3 or more channels is rejected rather than silently dropping channels.

Quick start

  1. In Praat, select between 1 and 8 Sound objects. Each selected Sound must be mono or stereo.
  2. Run Stereo_Mixer.praat.
  3. Choose a preset, or select Custom and enter L/R gains.
  4. If Custom is used with more than four sources, enable Edit custom gains 5 to 8 to open the second gain dialog.
  5. Choose whether to normalize the result, draw the visualization, and play the result.
  6. Click OK. The resulting Sound is left selected in the Objects window.
Example: four selected Sounds with the Stereo Spread preset produce a stereo Sound named Mixed_Spread_4src.

Source numbering: Objects-list order

The labels Sound 1, Sound 2, and so on refer to the selected Sound objects in the order returned by Praat's Objects list: top to bottom. They do not refer to the order in which the objects were clicked.

This matters for all presets whose pattern changes with source number, especially Stereo Spread, Wide Spread, Fade L to R, Fade R to L, and V Shape.

Preset gain patterns

Preset values replace the Custom gain entries for every selected source. The patterns are computed for the actual number of selected Sounds.

PresetGain patternBehavior
CustomUser-defined L/R gainsUses the values entered in the form and, optionally, the second dialog for Sounds 5–8.
All UnityL=1.0, R=1.0 for every sourcePreserves stereo sources at unity; mono sources become dual-mono.
Stereo SpreadOdd: 1.0 / 0.3
Even: 0.3 / 1.0
Alternates left-heavy and right-heavy sources.
Wide SpreadOdd: 1.0 / 0.0
Even: 0.0 / 1.0
Alternates hard-left and hard-right channel weighting.
Left HeavyL=1.0, R=0.3Weights every source toward the left side.
Right HeavyL=0.3, R=1.0Weights every source toward the right side.
Fade L to RL decreases 1→0; R increases 0→1Distributes sources progressively from left to right according to source number.
Fade R to LL increases 0→1; R decreases 1→0Reverse progression.
V ShapeL→R→LMoves the numbered source pattern from left toward right near the midpoint, then back toward left.
Single-source edge case: the fade presets avoid division by zero. With only one Sound, Fade L to R begins at L=1/R=0, while Fade R to L begins at L=0/R=1.

Custom gains

The main form exposes L/R gains for Sounds 1–4. Sounds 5–8 default to 1.0 / 1.0. When Custom is selected, more than four Sounds are present, and Edit custom gains 5 to 8 is enabled, a second dialog appears with the remaining gain controls.

Only gain values belonging to Sounds that actually exist in the current selection are used.

pan indicator = (R − L) / (R + L)

This derived value is used only for the stereo-field visualization and the compact L/C/R Info label; it is not the mixing law itself.

Custom negative gains: the form uses unrestricted real values, so negative gains are possible and invert polarity. The stereo-field pan indicator is intended primarily for ordinary non-negative gains; with negative values it should not be interpreted as a physical pan position.

Processing pipeline

  1. Validate selection: require 1–8 selected Sounds and reject any source with more than two channels.
  2. Read source properties: collect names, durations, sample rates, and source order.
  3. Choose output format: output duration is the longest source duration; output sample rate is the highest sample rate among the selected Sounds.
  4. Create a silent stereo buffer at that duration and sample rate.
  5. Prepare each source: copy it, resample it to the maximum sample rate when necessary, and convert mono input to stereo.
  6. Apply L/R gains independently to channels 1 and 2.
  7. Sum into the shared stereo buffer.
  8. Normalize if requested.
  9. Rename, visualize, and optionally play the result.

Different source durations

The output always lasts as long as the longest input. Shorter Sounds contribute only while they contain samples; after they end, their contribution is zero. If the longest and shortest durations differ by more than 0.1 seconds, the Info window reports the mismatch.

Different sample rates

The highest input sample rate becomes the output sample rate. Sources with a different sample rate are resampled to that rate with Praat's resampling command before mixing.

Parameters

ControlDefaultMeaning
PresetCustomSelects the L/R gain strategy.
Gain 1–4 L/R1.0Custom left and right gain for Sounds 1–4.
Edit custom gains 5 to 8OffWhen Custom is active and more than four Sounds are selected, opens a second dialog for Sources 5–8.
Normalize outputOnRuns final peak scaling on the completed stereo mix.
Target peak0.95Target amplitude passed to Scale peak. Must be greater than zero when normalization is enabled.
Draw visualizationOnDraws the AudioTools-style mixing summary.
Play resultOnPlays the resulting stereo Sound after processing.
Normalization is peak scaling, not attenuation-only protection. When enabled, Scale peak scales the completed mix so its peak reaches the requested target. It can therefore raise a quiet result as well as attenuate a loud one.

Visualization

When enabled, Stereo Mixer draws a compact AudioTools-style summary with four main information areas:

Stereo Field
One marker per source. Horizontal position is derived from the L/R gain ratio; marker size follows average gain. Blue indicates left-heavy, orange right-heavy, gray near-center.
L/R Gains
Paired blue/orange gain bars for each source, with a dotted unity reference at gain 1.0.
Output L/R waveforms
Separate waveform displays for the final left and right output channels.
Summary
Source count, preset, output duration, sample rate, and elapsed processing time.

The title reports the final result name, preset, and number of mixed Sounds.

Important behavior and limitations