8-Channel Canon

Create polyphonic canons by repeating a source as multiple time‑staggered “voices” distributed around an octophonic array, with optional transposition, time‑stretch (augmentation/diminution), and spatial patterns.

Author: Shai Cohen Affiliation: Department of Music, Bar-Ilan University, Israel Version: 0.1 (2025) Praat
Contents:

What this does

The script takes a mono or multi‑channel Sound and generates V canon voices. Each voice enters after a delay, may be pitch‑shifted and/or time‑stretched, and is routed to one or more of the eight output channels following a spatial pattern (pairs, ring, custom map). You can produce strict canons (identical material), augmentations/diminutions (duration scaled), crab cannons (reversed), and spiral canons (semitone stepping) across an octo layout.

Quick start

  1. Select a Sound (mono recommended for clarity).
  2. Run script…8-Channel Canon.praat.
  3. Set Voices (e.g., 4), Entry spacing (e.g., 500 ms), and choose a Routing pattern (Ring).
  4. Optionally set Transpose (semitones) and Stretch factor for augmentation/diminution.
  5. Enable Normalize and choose Mix (dry/wet). Press OK.

Praat dialog (labels mirrored)

The table below mirrors typical Praat‑style labels for this script. If any label in your dialog differs, tell me and I’ll adjust the HTML to match exactly.

Label (as in Praat)TypeDefaultDescription
Voicesinteger4Number of canon voices (1–8)
Entry spacing (ms)real500Delay between successive voices
Time modeoptionmsms | samples | sync
BPMreal120Used when Time mode=sync
Note valueoption1/41/1, 1/2, 1/4, 1/8, 1/16, dotted, triplet
Transpose (semitones)CSV0Per‑voice semitone offsets (e.g., 0,5,7,12)
Stretch factorCSV1.0Per‑voice time scaling (augmentation/diminution)
Reverse voicesCSV (0/1)0Reverse playback per voice (crab canon)
Voice gain (dB)CSV0Per‑voice trims
Routing patternoptionRingStraight | Pairs | Ring | Custom map
Custom map (voice→channel)text""CSV of 8 integers (0–7) or lists per voice; e.g., 0;1;2;3
Spread to neighborsreal0.0Amount to leak each voice into adjacent output channels
Mix (dry/wet)real1.00=dry only, 1=only canon
NormalizebooleanyesPeak normalize output to target
Target peakreal0.99Normalization target
ReportbooleannoPrint entry times, routing, gains
CSV fields accept one value per voice; shorter lists repeat the last value.

Voice→Channel routing

PatternDescription
StraightVoice v goes to channel v mod 8.
PairsVoices alternate between paired channels (0↔1, 2↔3, 4↔5, 6↔7).
RingVoices occupy consecutive channels around the ring; later entries rotate onward.
Custom mapExplicit mapping via Custom map.

“Spread to neighbors” applies a small equal‑power crossfeed to adjacent channels for width.

Additional Parameters

ParameterDefaultDescription
Entry offset (ms)0Global offset before the first voice
Trim tail (ms)0Remove trailing silence after rendering
Anti‑clip headroom (dB)0Pre‑mix attenuation to prevent overload
Pitch modeVarispeedVarispeed (fast) | Phase‑vocoder (pitch‑preserving)
Crossfade at entries (ms)10Small fade in/out to avoid clicks

Presets

🔁 Strict 4‑voice canon

Voices=4; Entry spacing=500 ms; Transpose=0,0,0,0; Stretch=1; Routing=Ring; Mix=1.0; Normalize=yes

🎼 Spiral canon

Voices=6; Entry spacing=1/8 (sync); Transpose=0,2,4,5,7,9; Pitch mode=Phase‑vocoder; Normalize=yes

⏱️ Augmentation/Diminution

Voices=4; Stretch=0.5,0.75,1.0,1.5; Entry spacing=400 ms; Routing=Pairs

🦀 Crab canon

Voices=2; Reverse voices=0,1; Entry spacing=0; Transpose=0,0; Routing=Custom 0;7; Mix=1.0

🌀 Rotating ring

Voices=8; Entry spacing=250 ms; Routing=Ring; Spread=0.12; Target peak=0.98

Workflow & Tips

Math

Entry times

Let V voices, base spacing Δ (seconds). Voice v enters at t_v = t_0 + v·Δ. In sync mode, Δ = k · (60/BPM).

Transpose & stretch

Semitone s → pitch ratio r_p = 2^{s/12}. Stretch a scales time by a. Varispeed: both pitch and duration multiply; PV: duration only.

Routing

Channel index c_v = (c_0 + v) mod 8 for Ring; for Pairs use (0↔1),(2↔3),(4↔5),(6↔7). Spread applies small equal‑power taps to neighbors.