Multitrack Router β€” User Guide

Form-driven multitrack routing and time-placement engine. Select N Sound objects, assign them to virtual tracks, sequence/reorder them, insert silences, apply gain + fades, and render a single output Sound object in mono, stereo, or multichannel format.

Author: Shai Cohen Version: 2.0 (2025) Technique: Multitrack Routing & Mixing Category: Routing / Mixing / Composition Citation: Cohen, S. (2025). Praat AudioTools Requires: Praat β‰₯ 6.0
Contents:

What this does

This script implements a Multitrack Router β€” a comprehensive routing and time-placement engine that takes multiple selected Sound objects, assigns them to virtual tracks, sequences them, applies gain and fades, and renders a single output in mono, stereo, or multichannel format.

πŸŽ›οΈ What is Multitrack Routing?

Multitrack routing is the process of assigning multiple audio sources to specific tracks, controlling their timing relationships, and mixing them down to a final output. This tool provides:

  • Flexible assignment β€” All on track 1, one per sound, round-robin, manual, or sequence per track
  • Order control β€” Selection order, alphabetical, or manual ordering
  • Timing modes β€” All start at 0, or sequential with gaps/overlaps
  • Per-sound overrides β€” Gain, fade in/out, and order positions
  • Output formats β€” Mono (sum), Stereo (pan per track), Multichannel (track per channel)
  • Silence insertion β€” SILx tokens in sequence mode for adding pauses

Key Features:

Technical Implementation: (1) Input: Read all selected sounds, store durations and sample rates. (2) Assignment: Map sounds to tracks based on mode. (3) Ordering: Sort within tracks. (4) Timing: Compute start times based on gaps/overlaps. (5) Rendering: For each track, create silent canvas, overlay sounds with gains/fades. (6) Output: Combine tracks into mono, stereo, or multichannel output. (7) Schedule: Print detailed timeline.

Quick start

  1. In Praat, select multiple Sound objects (at least one).
  2. Run script… β†’ select Multitrack_Router.praat.
  3. Set Number of tracks (virtual tracks).
  4. Choose Assignment mode (how sounds map to tracks).
  5. If using Manual or Sequence mode, fill in the appropriate fields.
  6. Set Order mode (Selection order, Alphabetical, or Manual).
  7. Configure timing (Time mode, Gap seconds, Crossfade seconds, Crossfade shape).
  8. Set default gain and fades, and per-sound overrides if desired.
  9. Choose output format (Mono, Stereo, Multichannel) and pan positions if stereo.
  10. Enable Print schedule to see detailed timeline in Info window.
  11. Click Run β€” engine assigns, sequences, renders, creates output.
Quick tip: Start with 2-3 short sounds, set Assignment mode = "One track per sound", Time mode = "Sequential", Gap seconds = 0.0 for butt-joined sequence. This will create a simple concatenation of your sounds in order. The output appears as "Routed_mono", "Routed_stereo", or "Routed_multi" in the Objects window.
Important: RESAMPLING β€” All sounds are resampled to the highest sample rate among selected sounds. This ensures compatibility but may take time for long files. FADES β€” Per-sound fades are limited to 45% of sound duration to prevent complete muting. CROSSFADES in sequential mode with negative gaps create overlaps with crossfades. SILENCE TOKENS in Sequence mode use "SILx" where x is duration in seconds (e.g., "SIL0.5" for 0.5s silence).

Routing Theory

Assignment Modes

πŸ“Š 5 Ways to Map Sounds to Tracks

ModeDescriptionUse Case
All on track 1Every sound assigned to track 1Simple summing, layering all sounds together
One track per soundTrack count = number of soundsIndividual control, panning per sound
Round-robinSounds distributed cyclically across tracksLoad balancing, alternating patterns
ManualSpace-separated list of track numbersExact control over each sound's track
Sequence per trackPipe-separated sequences with indices + SILxComplex timelines, silence insertion

Order Modes

Within each track, sounds are ordered according to: Selection order: Original order in which sounds were selected Alphabetical: By sound name (string comparison) Manual: By position numbers in Order field (space-separated, 1..N)

Timing Models

⏱️ Time Placement

All start at 0: All sounds begin at time 0, layered.

Sequential: Sounds placed one after another with optional gaps/overlaps:

start[n] = end[n-1] + gap_seconds where gap_seconds can be: > 0 : silence between sounds = 0 : butt-joined (no gap) < 0 : overlap (negative = overlap duration) When gap < 0 and crossfade_seconds > 0: β€’ The overlapping region uses crossfade β€’ Fade-out applied to previous sound β€’ Fade-in applied to current sound

Crossfade shapes:

  • Linear: amplitude fades linearly
  • Equal power: sin/cos curves (constant perceived loudness)

Per-Sound Override System

For parameters that can vary per sound (gain, fade in, fade out, order position), the system uses: default value + optional space-separated list The list can have fewer values than sounds β€” missing entries use default. Order of values corresponds to selection order (unless overridden by Order mode). Example: Gains dB = "-3 0 -6" β†’ sound1=-3dB, sound2=0dB, sound3=-6dB, sound4..N use default.

Output Formats

FormatDescriptionChannels
MonoAll tracks summed to single channel1
StereoEach track panned using equal-power law2
MultichannelEach track becomes a separate channelnumber_of_tracks

Stereo Panning

panAngle = (pan + 1) / 2 Γ— Ο€/2 leftGain = cos(panAngle) rightGain = sin(panAngle) where pan ranges from -1 (hard left) to +1 (hard right), 0 = center. If pan_positions field is empty, tracks are auto-spread evenly: track 1: -1.0, track 2: -0.5, track 3: 0.0, track 4: 0.5, track 5: 1.0, etc.

Parameters & Controls

Routing Parameters

ParameterDescription
Number of tracksVirtual tracks (1-128, auto-adjusted for mode 2)
Assignment modeAll on track 1, One per sound, Round-robin, Manual, Sequence per track
Assignments(Manual mode) Space-separated track numbers, one per sound
Sequences(Sequence mode) Pipe-separated token lists (indices + SILx)

Order Parameters

ParameterDescription
Order modeSelection order, Alphabetical, Manual
Order(Manual mode) Space-separated position numbers (1..N)

Timing Parameters

ParameterDescription
Time modeAll start at 0, or Sequential
Gap secondsTime between sounds in sequential mode (+ = silence, - = overlap)
Crossfade secondsDuration of overlap crossfade (when gap < 0)
Crossfade shapeLinear or Equal power

Gain & Fade Parameters

ParameterDescription
Default gain dBGlobal gain applied to all sounds
Gains dBSpace-separated per-sound gain overrides
Fade in secondsGlobal fade-in duration
Fade out secondsGlobal fade-out duration
Fades inSpace-separated per-sound fade-in overrides
Fades outSpace-separated per-sound fade-out overrides

Output Parameters

ParameterDescription
Output channelsMono, Stereo, or Multichannel
Pan positions(Stereo) Space-separated pan values per track (-1..1)
Normalize outputScale output to peak 0.99
Print scheduleOutput detailed timeline in Info window

Syntax Guide

Manual Assignment Mode

Assignments field = space-separated track numbers, one per sound in selection order. Example with 5 sounds and 3 tracks: "1 2 3 2 1" β†’ sound1β†’track1, sound2β†’track2, sound3β†’track3, sound4β†’track2, sound5β†’track1

Sequence per Track Mode

πŸ“ Pipe-Separated Sequences

Format: track1_seq | track2_seq | track3_seq | ...

Each track's sequence is a space-separated list of tokens:

  • Numbers β€” sound indices (1..N in selection order)
  • SILx β€” silence of x seconds (e.g., SIL0.5, SIL2.0)

Example with 4 sounds and 2 tracks:

1 SIL0.3 2 | 3 4 SIL1.0

Track 1: sound1 β†’ 0.3s silence β†’ sound2

Track 2: sound3 β†’ sound4 β†’ 1.0s silence

Important: Sound indices refer to selection order, not original names.

Manual Order Mode

Order field = space-separated position numbers (1..N) defining the desired order. Example with 5 sounds: "3 1 5 2 4" β†’ sound3 first, then sound1, sound5, sound2, sound4 last

Per-Sound Override Lists

Gains dB: "-3 0 -6" β†’ sound1=-3, sound2=0, sound3=-6, rest default Fades in: "0.1 0.2" β†’ sound1=0.1s, sound2=0.2s, rest default Fades out: "0.15" β†’ sound1=0.15s, rest default

Pan Positions (Stereo Output)

Pan positions = space-separated values per track (-1 to 1) Example with 4 tracks: "-1 -0.33 0.33 1" β†’ track1=hard left, track2=left-center, track3=right-center, track4=hard right If field is empty, tracks are auto-spread evenly: track i = -1 + 2Γ—(i-1)/(tracks-1)

Schedule Output Example

Seg | Trk | Type | Src | Start | End | Gain | FdIn | FdOut --- | --- | ------- | --- | --------- | --------- | ----- | ------ | ------ 1 | 1 | AUDIO | 1 | 0.0000 | 2.5000 | -3.0 | 0.010 | 0.010 (sound1) 2 | 1 | SILENCE | - | 2.5000 | 3.0000 | 0.0 | 0.000 | 0.000 3 | 2 | AUDIO | 3 | 0.0000 | 1.8000 | 0.0 | 0.010 | 0.010 (sound3)

Applications

Electroacoustic Composition

Use case: Creating complex multitrack arrangements from individual sound files

Technique: Sequence per track mode with custom timing and pans

Workflow:

Sound Design for Media

Use case: Building complex soundscapes from source elements

Technique: All on track 1 (layering) with staggered starts via gaps/overlaps

Applications:

Music Production

Use case: Arranging multitrack stems into a final mix

Technique: One track per sound (or Manual) with stereo panning

Settings:

Research & Education

Use case: Demonstrating routing, mixing, and timeline concepts

Technique: Enable Print schedule, use simple test signals

Learning outcomes:

Practical Workflow Examples

🎬 Film Scene: Layered Atmosphere

Goal: Create 60-second atmospheric texture from 3 drones

Settings:

  • Sounds: drone1 (20s), drone2 (15s), drone3 (25s)
  • Tracks: 1 (All on track 1)
  • Time mode: All start at 0
  • Output: Stereo, pan: -1, 0, 1
  • Gains: "-6 -3 -9" (different levels)
  • Fades in: "5 4 6" (long fades)

Result: Rich, evolving texture with drones layered, panned, and slowly fading in

πŸ₯ Rhythmic Sequence

Goal: Create rhythmic pattern from 4 drum hits

Settings:

  • Sounds: kick, snare, hihat, crash (short sounds)
  • Tracks: 1 (One track per sound) or 1 track with sequencing
  • Time mode: Sequential, gap = 0.25s
  • Output: Stereo, auto-spread pan
  • Crossfade: 0 (butt-joined)

Result: Rhythmic pattern: kick β†’ 0.25s β†’ snare β†’ 0.25s β†’ hihat β†’ 0.25s β†’ crash

🎚️ Complex Arrangement

Goal: Create 2-track arrangement with silences and overlapping elements

Settings:

  • Sounds: intro (3s), theme (5s), bridge (4s), outro (3s)
  • Mode: Sequence per track
  • Sequences: "1 SIL0.5 2 | 3 SIL1.0 4"
  • Time mode: All start at 0 (tracks independent)
  • Gap seconds: -0.5 (overlap), crossfade=0.5s
  • Output: Stereo, pan: -0.8, 0.8

Result: Track1: intro β†’ 0.5s silence β†’ theme | Track2: bridge β†’ 1.0s silence β†’ outro, with overlapping crossfades

Troubleshooting Common Issues

Problem: Output has clicks/pops at segment boundaries
Cause: Fades too short or missing
Solution: Increase default fade in/out (0.01-0.02s), ensure crossfade duration is appropriate for overlap
Problem: Sounds out of sync or wrong order
Cause: Order mode misinterpretation, or selection order not as expected
Solution: Use Print schedule to verify timeline; check Order mode and Manual order field if used
Problem: Stereo image unbalanced or missing
Cause: Pan positions not set correctly, or auto-spread not desired
Solution: Provide explicit pan_positions field, or verify auto-spread calculation
Problem: Processing very slow
Cause: Many long sounds, each requiring resampling and fades
Solution: Reduce number of sounds, ensure all sounds have same sample rate to avoid resampling
Problem: "Bad index" error in Sequence mode
Cause: Sound index out of range, or syntax error in token
Solution: Check that all indices are 1..Nounds; ensure SILx format is correct (e.g., SIL0.5, not SIL 0.5)

Advanced Techniques

Multiple runs with same sounds:

The script doesn't modify original sounds, so you can run multiple times with different routing parameters to generate variations.

Combining with other scripts:

Use output of this script as input to other AudioTools (e.g., Spectral Panning Mapper, Temporal Turing Morph) for further processing.

Batch processing:

For batch processing, save form settings and use Praat's scripting to call the script with different parameter sets.

Multichannel monitoring:

For true multichannel output, you'll need a DAW or audio interface that supports >2 channels. The multichannel output file can be split in Praat using "Extract all channels".