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.
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.
- Voices: up to 8, each with entry time, gain, transpose, and stretch.
- Sync: absolute ms/samples or tempo‑sync note values.
- Spatialization: per‑voice channel mapping or rotating patterns.
Quick start
- Select a Sound (mono recommended for clarity).
- Run script… →
8-Channel Canon.praat. - Set Voices (e.g., 4), Entry spacing (e.g., 500 ms), and choose a Routing pattern (Ring).
- Optionally set Transpose (semitones) and Stretch factor for augmentation/diminution.
- 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) | Type | Default | Description |
|---|---|---|---|
| Voices | integer | 4 | Number of canon voices (1–8) |
| Entry spacing (ms) | real | 500 | Delay between successive voices |
| Time mode | option | ms | ms | samples | sync |
| BPM | real | 120 | Used when Time mode=sync |
| Note value | option | 1/4 | 1/1, 1/2, 1/4, 1/8, 1/16, dotted, triplet |
| Transpose (semitones) | CSV | 0 | Per‑voice semitone offsets (e.g., 0,5,7,12) |
| Stretch factor | CSV | 1.0 | Per‑voice time scaling (augmentation/diminution) |
| Reverse voices | CSV (0/1) | 0 | Reverse playback per voice (crab canon) |
| Voice gain (dB) | CSV | 0 | Per‑voice trims |
| Routing pattern | option | Ring | Straight | 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 neighbors | real | 0.0 | Amount to leak each voice into adjacent output channels |
| Mix (dry/wet) | real | 1.0 | 0=dry only, 1=only canon |
| Normalize | boolean | yes | Peak normalize output to target |
| Target peak | real | 0.99 | Normalization target |
| Report | boolean | no | Print entry times, routing, gains |
Voice→Channel routing
| Pattern | Description |
|---|---|
| Straight | Voice v goes to channel v mod 8. |
| Pairs | Voices alternate between paired channels (0↔1, 2↔3, 4↔5, 6↔7). |
| Ring | Voices occupy consecutive channels around the ring; later entries rotate onward. |
| Custom map | Explicit mapping via Custom map. |
“Spread to neighbors” applies a small equal‑power crossfeed to adjacent channels for width.
Additional Parameters
| Parameter | Default | Description |
|---|---|---|
| Entry offset (ms) | 0 | Global offset before the first voice |
| Trim tail (ms) | 0 | Remove trailing silence after rendering |
| Anti‑clip headroom (dB) | 0 | Pre‑mix attenuation to prevent overload |
| Pitch mode | Varispeed | Varispeed (fast) | Phase‑vocoder (pitch‑preserving) |
| Crossfade at entries (ms) | 10 | Small 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
- Gain staging: More voices increase level; use Anti‑clip headroom and Normalize.
- Tempo sync: Use musical Note value with BPM for rhythmic entries.
- Pitch mode: Varispeed is vivid but changes pitch with stretch; use phase‑vocoder to preserve pitch.
- Routing: For clear counterpoint, avoid heavy spreading; for ambient swarms, increase spread.