Multitrack Router — User Guide

Routes one or more selected Sound objects onto virtual mono tracks, places them in time, applies gain and fades, and renders mono, stereo, or multichannel output.

Author: Shai Cohen Affiliation: Department of Music, Bar-Ilan University, Israel Version: 3.3.5 (2026) License: MIT License Requires: Praat ≥ 6.0
Contents:

What this does

Multitrack Router takes all selected Sound objects, maps them to a configurable set of virtual tracks, schedules each track, renders every track as a mono stem, and combines the stems into one final Sound.

Signal model: source objects are not modified. Each scheduled audio occurrence is copied, reduced to a mono working segment if necessary, resampled if necessary, gain-scaled, faded, and placed on a mono virtual track. Stereo or multichannel structure is created only when the completed tracks are combined.

Quick start

  1. Select at least one Sound object.
  2. Run Multitrack_Router.praat.
  3. Choose a Preset, or leave Custom to use the visible routing and timing controls directly.
  4. For Manual or Sequence assignment, enter the required syntax in Seq.
  5. Use Overrides only when per-source gain/channel/order or track pan is required.
  6. Choose Mono, Stereo, or Multichannel output; optionally disable normalization or visualization.
Defaults in Custom: 2 tracks, All on track 1, Sequential timing, 0 s gap, 0 s crossfade, 0 dB gain, 0.01 s fade in/out, Mono output, Normalize = yes, Draw_visualization = yes.
Normalization: when enabled, Praat Scale peak: 0.99 is applied whenever the current peak is above 0.001. This is full peak normalization, not only clipping protection, so it can also amplify a quiet result.

Presets

Preset processing occurs after the form and override tags are read. A preset therefore replaces the routing/timing/output fields listed below. Per-source g:, ch:, pan:, and ord: data remain available unless the resulting mode makes a tag irrelevant. Crossfade Montage explicitly forces equal-power crossfade shape.

PresetTracks / assignmentTimingFadesOutput
CustomUses form valuesUses form valuesUses form valuesUses form value
Sequential Chain1 / All on track 1Sequential, gap 0, crossfade 00.005 s in/outMono
Crossfade Montage1 / All on track 1Sequential, gap −0.05 s, crossfade 0.05 s, equal-power0 s defaults; crossfade supplies edge fadesMono
Stereo Spread2 / Round-robinSequential, gap 00.01 s in/outStereo
Layered StackN / One track per soundAll at 00.02 s in/outMono
Dialogue Assembly1 / All on track 1Sequential, +0.30 s gap0.01 s in/outMono
Multichannel SplitN / One track per soundOne segment per track; each starts at 00.005 s in/outN-channel

Assignment & sequencing

Track count

Tracks is clamped to at least 1. In One track per sound, it is forced to the number of selected Sounds. In assignment modes 1–4, a requested track count larger than the number of selected Sounds is reduced to that number. Sequence mode may retain additional empty tracks.

Assignment modes

ModeActual behavior
All on track 1Every selected Sound becomes a segment on track 1.
One track per soundSound i is assigned to track i; track count is forced to N.
Round-robinSound i goes to ((i−1) mod Tracks)+1.
ManualSeq must contain at least N track numbers, one per selected Sound. Each value must be within 1..Tracks.
SequenceSeq is a pipe-separated list of per-track token sequences. Sound indices may be repeated. SILx inserts an explicit silence segment of x seconds.
Sequence example:
1 SIL0.3 2 | 3 4 SIL1.0
Track 1 contains Sound 1, 0.3 s silence, Sound 2. Track 2 contains Sound 3, Sound 4, then 1.0 s silence.

If Sequence mode is selected with an empty Seq field, the script automatically distributes the selected Sound indices round-robin across the requested tracks and uses those generated sequences.

Timing, gaps, overlaps & fades

Timing modes

All at 0: start(segment) = 0 Sequential: next_start = previous_end + Gap_s Gap_s > 0 → silence between adjacent segments Gap_s = 0 → butt join Gap_s < 0 → overlap depth = |Gap_s|

In Sequence mode, explicit SILx tokens are ordinary timed segments, so their durations participate in sequential placement just like audio-segment durations.

Crossfade semantics in v3.3.5

Gap_s and Crossfade_s are independent. A negative Gap_s determines placement and therefore the actual requested overlap. Crossfade_s only sets the edge-fade length inside that overlap and is clamped to the overlap that is actually available.

requested_overlap = |Gap_s| actual_overlap = requested_overlap, except when the start would fall before t = 0 crossfade_length = min(Crossfade_s, actual_overlap) Example: Gap_s = -0.50, Crossfade_s = 0.05 → 0.50 s overlap, with 0.05 s edge fades

If Crossfade_s is shorter than the overlap, the middle of the overlap remains at full level. If it equals the overlap, the fade pair spans the whole overlap. Existing segment fade-in/out values are not shortened: the longer fade wins.

Fade shapes

Negative fade values are clamped to 0. Fades are applied only to source segments at least 0.03 s long, and each fade is capped at 45% of that segment's duration.

Overrides syntax

Overrides is a compact tag field. Tags are separated by whitespace; each tag's values continue until the next tag.

TagMeaningRules
g:Per-source gain in dBValues correspond to selected Sound indices. Missing entries retain Gain_dB; extra entries beyond N are ignored.
ch:Per-source channel choice0 = convert multichannel source to mono, 1 = source channel 1, 2 = source channel 2. Invalid values are reset to 0. Mono sources remain mono.
pan:Per-track stereo panOnly used for Stereo output. Values are clamped to −1..+1. If a manual list is present but shorter than the track count, unspecified tracks remain centered rather than being auto-spread.
ord:Per-source order rankRequires at least N values. Lower rank is placed earlier within the source's assigned track. It is not a list of sound indices and is not applied to explicit Sequence mode.
xf:Crossfade shapelin selects linear; every other value selects equal-power. Crossfade Montage forces equal-power.
schedBackward-compatible no-opThe schedule already prints by default in v3.3+.

Examples

g:-3 0 -6 → Sound 1 = -3 dB, Sound 2 = 0 dB, Sound 3 = -6 dB ch:0 2 1 → Sound 1 downmix-to-mono, Sound 2 channel 2, Sound 3 channel 1 ord:3 1 2 → ranks are [3,1,2], so on the same track the order becomes Sound 2 → Sound 3 → Sound 1 pan:-1 0 1 → tracks 1/2/3 hard-left / centre / hard-right

Rendering & output

Per-segment rendering

  1. Copy the source Sound.
  2. If it has more than one channel, apply the ch: choice: channel 1, channel 2, or Convert to mono.
  3. If its sampling frequency differs from the highest selected-source rate, resample the copy to that rate with precision 50.
  4. Apply gain 10^(dB/20).
  5. Apply fade-in/out.
  6. Add only the affected sample range into the scheduled position on the mono track canvas.

Output formats

OutputCombinationObject name
MonoAll mono track stems summed directly.Routed_mono
StereoEach track is sent to L/R by equal-power panning.Routed_stereo
MultichannelTrack t becomes output channel t.Routed_multi

Stereo panning

angle = (pan + 1) / 2 × π/2 L = cos(angle) R = sin(angle) pan = -1 → hard left pan = 0 → centre (≈0.707 / 0.707) pan = +1 → hard right

Without a pan: override, only active tracks are spread evenly from −1 to +1. If only one track is active, it is centered.

Duration and normalization

Each virtual track canvas extends to its latest segment end plus a 0.0005 s tail margin. Final duration is the maximum track duration. No limiter is used.

If Normalize = yes and the pre-normalization peak is above 0.001, the complete output is peak-normalized to 0.99 with Praat Scale peak. With Normalize disabled, summed peaks may exceed ±1 internally.

Schedule

When at least one segment exists, the Info window automatically prints one line per segment with segment number, track, AUDIO/SILENCE type, source index, start/end times, gain, stored fade-in/out values, and source name. Render-time fade caps are not written back into those stored schedule values.

Playback: the completed output is always selected and played at the end of the script. There is no Play-result toggle in v3.3.5.

Visualization

With Draw_visualization = yes, the script draws an 8-wide Praat picture with three main regions:

The timeline is a process view, not a sample-accurate editing display. Its fade lines are simple visual approximations of the envelopes, and only the first eight tracks are shown when more tracks exist.

Practical uses

Sequential assembly

Place phrases, events, or dialogue one after another with explicit gaps or overlaps.

Layered construction

Start sources together, keep them on independent virtual tracks, then sum or spatialize the tracks at output.

Multichannel preparation

Use one track per source and Multichannel output to produce one output channel per virtual track.

Algorithmic sequencing

Use repeated source indices and SILx markers in Sequence mode to construct track-specific event lists.

Notes & edge cases