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.
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.
- 5 assignment modes: All on track 1, One track per sound, Round-robin, Manual, and Sequence.
- 2 timing modes: all segments start at 0, or sequential placement with positive gaps, butt joins, or negative-gap overlaps.
- 7 presets: Custom plus six routing/timing setups.
- Source-channel handling: multichannel inputs are downmixed to mono by default, or channel 1 / channel 2 can be selected with
ch:. - Sample-rate unification: segment copies are resampled, when necessary, to the highest sampling frequency among the selected Sounds.
- 3 outputs: mono sum, stereo equal-power track panning, or one output channel per virtual track.
- Schedule and picture: the schedule prints automatically; the picture display is optional.
Quick start
- Select at least one Sound object.
- Run
Multitrack_Router.praat. - Choose a Preset, or leave Custom to use the visible routing and timing controls directly.
- For Manual or Sequence assignment, enter the required syntax in Seq.
- Use Overrides only when per-source gain/channel/order or track pan is required.
- Choose Mono, Stereo, or Multichannel output; optionally disable normalization or visualization.
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.
| Preset | Tracks / assignment | Timing | Fades | Output |
|---|---|---|---|---|
| Custom | Uses form values | Uses form values | Uses form values | Uses form value |
| Sequential Chain | 1 / All on track 1 | Sequential, gap 0, crossfade 0 | 0.005 s in/out | Mono |
| Crossfade Montage | 1 / All on track 1 | Sequential, gap −0.05 s, crossfade 0.05 s, equal-power | 0 s defaults; crossfade supplies edge fades | Mono |
| Stereo Spread | 2 / Round-robin | Sequential, gap 0 | 0.01 s in/out | Stereo |
| Layered Stack | N / One track per sound | All at 0 | 0.02 s in/out | Mono |
| Dialogue Assembly | 1 / All on track 1 | Sequential, +0.30 s gap | 0.01 s in/out | Mono |
| Multichannel Split | N / One track per sound | One segment per track; each starts at 0 | 0.005 s in/out | N-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
| Mode | Actual behavior |
|---|---|
| All on track 1 | Every selected Sound becomes a segment on track 1. |
| One track per sound | Sound i is assigned to track i; track count is forced to N. |
| Round-robin | Sound i goes to ((i−1) mod Tracks)+1. |
| Manual | Seq must contain at least N track numbers, one per selected Sound. Each value must be within 1..Tracks. |
| Sequence | Seq is a pipe-separated list of per-track token sequences. Sound indices may be repeated. SILx inserts an explicit silence segment of x seconds. |
1 SIL0.3 2 | 3 4 SIL1.0Track 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
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.
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
- Ordinary, non-crossfade segment fades use Praat's built-in Hanning
Fade in/Fade out. - Segments participating in a crossfade use the explicit shape selected by
xf:. xf:linuses linear amplitude ramps. For correlated material the amplitude sum meets at unity; uncorrelated material can dip by about 3 dB at the midpoint.xf:epuses sine/cosine equal-power ramps. It maintains summed power for uncorrelated material; strongly correlated material can rise by about 3 dB at the midpoint.
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.
| Tag | Meaning | Rules |
|---|---|---|
g: | Per-source gain in dB | Values correspond to selected Sound indices. Missing entries retain Gain_dB; extra entries beyond N are ignored. |
ch: | Per-source channel choice | 0 = 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 pan | Only 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 rank | Requires 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 shape | lin selects linear; every other value selects equal-power. Crossfade Montage forces equal-power. |
sched | Backward-compatible no-op | The schedule already prints by default in v3.3+. |
Examples
Rendering & output
Per-segment rendering
- Copy the source Sound.
- If it has more than one channel, apply the
ch:choice: channel 1, channel 2, orConvert to mono. - If its sampling frequency differs from the highest selected-source rate, resample the copy to that rate with precision 50.
- Apply gain
10^(dB/20). - Apply fade-in/out.
- Add only the affected sample range into the scheduled position on the mono track canvas.
Output formats
| Output | Combination | Object name |
|---|---|---|
| Mono | All mono track stems summed directly. | Routed_mono |
| Stereo | Each track is sent to L/R by equal-power panning. | Routed_stereo |
| Multichannel | Track t becomes output channel t. | Routed_multi |
Stereo panning
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.
Visualization
With Draw_visualization = yes, the script draws an 8-wide Praat picture with three main regions:
- Track timeline: up to the first 8 tracks. Segment width represents time; audio-block height is scaled from the source RMS; source index controls block colour. Explicit silence is shown as a low neutral block.
- Timing overlays: fade-in/out lines are drawn on audio blocks; overlap pairs that have a crossfade are hatched. For stereo output, each visible track also has an L/C/R pan indicator.
- Output waveform: mono shows one waveform; stereo overlays L in blue and R in orange; multichannel shows channel 1 as a representative waveform.
- Summary: preset, assignment, layer/sequential mode, gap, crossfade value/shape, default fades, output format, duration, peak, gain, segment count, and normalization state.
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
- Manual assignment: the Seq list must provide at least one valid track number for every selected Sound.
- Sequence syntax: sound tokens must resolve to indices 1..N;
SILxrequires a strictly positive numeric duration. - Ordering:
ord:is a rank vector, not a requested sequence. Equal ranks retain their existing relative order. - Crossfade without overlap:
Crossfade_sdoes not create an overlap by itself. A negativeGap_sis required. - Multiple-channel sources: every source occurrence becomes mono before track rendering; use
ch:when a specific first or second source channel is required. - Normalization: disable it when preserving absolute level relationships at the final output is important.