8-Channel Canon
Creates eight fixed canon voices from one selected Sound, with independent semitone shifts and entry delays, then delivers the same eight-voice canon as octophonic audio, stems, a four-channel fold-down, or stereo.
What this does
8-Channel Canon always creates eight voices. Each voice is a pitch-shifted copy of the same mono working source, with its own semitone offset and delay. Pitch shifting uses sample-rate reinterpretation, so pitch and duration change together: upward transposition shortens a voice and downward transposition lengthens it.
The eight delayed voices first exist as eight separate working channels. Only after that canon has been built does the script choose an output format. This means the pitch/delay mechanism is the same whether the result is kept as eight channels, split into stems, folded to four channels, or mixed to stereo.
Quick start
- Select exactly one Sound in Praat.
- Run
8-Channel_Canon.praat. - Choose one of the nine named presets, or Custom.
- For Custom, set the eight Semitones values and eight Delay values.
- Choose the Output_format: 8-channel, four stereo pairs, two quad groups, 4-channel fold-down, or stereo.
- Leave Draw_visualization and Play_result on if you want the Picture-window analysis and an audition after processing.
Play_result auditions a temporary mono monitoring mix of all eight voices rather than playing only the first stem.
Processing pipeline
1. Mono working source and resampling
The selected Sound is copied, converted to mono, and resampled to Resample_frequency with Praat precision 50. Multichannel sources therefore enter the canon through Praat's ordinary channel-average mono conversion.
2. Eight varispeed voices
This is sample-rate reinterpretation followed by resampling, not independent pitch-preserving transposition. A +12 st voice is approximately half the duration; a -12 st voice is approximately twice the duration.
3. Entry fades
Each voice receives a fade-in and fade-out of Fade_time. For a short voice, the script clamps the fade to at most half that voice's duration so the two fades cannot overlap. A non-positive fade value produces no fade.
4. Delay placement
Each voice is placed in its own output-channel buffer at its requested delay. If any delay is negative, all eight delays are shifted together so that the earliest entry becomes 0 s. Relative delay differences are preserved.
5. Shared-gain normalization
The script measures the peak of all eight working channels, derives one common gain that makes the loudest working channel peak at 0.95, and applies that same gain to every voice channel. Stem formats therefore preserve relative level between voice groups. The 4-channel fold-down and stereo mix are summed first and then their finished output is peak-scaled to 0.95 once more.
Presets
Named presets replace both the eight semitone fields and the eight delay fields. Other settings, including sample rate, fade, output format, visualization, and playback, remain user-controlled.
| Preset | Semitones V1–V8 | Delays V1–V8 (s) |
|---|---|---|
| Custom | 0, 2, 4, 5, 7, 9, 11, 12 | 0, .2, .4, .6, .8, 1.0, 1.2, 1.4 |
| Classic Canon | 0, 0, 0, 0, 0, 0, 0, 0 | 0, .3, .6, .9, 1.2, 1.5, 1.8, 2.1 |
| Cluster | 0, 1, 2, 3, -1, -2, -3, -4 | 0, .15, .30, .45, .60, .75, .90, 1.05 |
| Wide Spread | 0, 4, 7, 10, -3, -7, -10, -14 | 0, .25, .50, .75, 1.00, 1.25, 1.50, 1.75 |
| Microtonal | 0, .5, 1, 1.5, 2, -.5, -1, -1.5 | 0, .1, .2, .3, .4, .5, .6, .7 |
| Symmetrical | 6, 4, 2, 0, 0, -2, -4, -6 | 0, .2, .4, .6, .6, .8, 1.0, 1.2 |
| Octave Stack | 0, 12, -12, 24, -24, 12, -12, 0 | 0, .2, .4, .6, .8, 1.0, 1.2, 1.4 |
| Major Scale | 0, 2, 4, 5, 7, 9, 11, 12 | 0, .15, .30, .45, .60, .75, .90, 1.05 |
| Chromatic | 0, 1, 2, 3, 4, 5, 6, 7 | 0, .1, .2, .3, .4, .5, .6, .7 |
| Fifths Tower | 0, 7, 14, 21, -7, -14, -21, -28 | 0, .25, .50, .75, 1.00, 1.25, 1.50, 1.75 |
Parameters
| Parameter | Default | Actual behavior |
|---|---|---|
| Preset | Custom | Custom uses the form values; named presets replace all eight semitone and delay values. |
| Semitones_1 … Semitones_8 | 0, 2, 4, 5, 7, 9, 11, 12 | Real-valued semitone shifts. Fractional semitones are allowed. |
| Delay_1 … Delay_8 | 0.0 … 1.4 s | Real-valued entry delays. Negative values are shifted as a block so the earliest effective entry is 0. |
| Resample_frequency | 44100 Hz | Working sample rate used before and after the varispeed reinterpretation. |
| Fade_time | 0.01 s | Fade-in and fade-out per voice; clamped to half the individual voice duration. |
| Output_format | 8-channel octophonic | Selects the deliverable channel/stem structure after all eight canon voices have been built. |
| Draw_visualization | on | Draws the timeline, monitoring spectrogram, and summary. |
| Play_result | on | Plays the output when one object exists; in stem formats, plays the temporary all-voice mono monitor instead. |
Output formats
| Format | Objects | Mapping | Naming |
|---|---|---|---|
| 8 channels — octophonic | 1 × 8-channel | Ch1–Ch8 = V1–V8 | <source>_canon8ch_<preset> |
| 4 stereo pairs | 4 × stereo | V1|V2, V3|V4, V5|V6, V7|V8 | ..._canon_pair_12_... through ..._pair_78_... |
| 2 quadraphonic groups | 2 × 4-channel | Quad 1 = V1–V4; Quad 2 = V5–V8 | ..._canon_quad_1to4_..., ..._quad_5to8_... |
| 4-channel fold-down | 1 × 4-channel | Ch1=V1+V5; Ch2=V2+V6; Ch3=V3+V7; Ch4=V4+V8 | <source>_canon_fold4_<preset> |
| Stereo mix | 1 × stereo | L = V1+V2+V3+V4; R = V5+V6+V7+V8 | <source>_canon_stereo_<preset> |
Visualization
The current Picture-window visualization is built from the full eight-voice canon, independent of the selected output format.
Canon timeline
- Eight horizontal bars show each voice's effective delay and actual post-transposition duration.
- Warm colours indicate non-negative semitone shifts; cool colours indicate negative shifts.
- Each sufficiently wide bar is labelled with voice number and semitone shift.
- The left-side labels show the active output routing for each voice.
- For four stereo pairs, two quad groups, and stereo mix, alternating background bands show the corresponding output grouping.
Monitoring spectrogram
The spectrogram is not taken from the first output stem. The script temporarily combines all eight working voices to an 8-channel object, converts that to mono, scales it to peak 0.95, and uses this all-voice monitoring mix for the spectrogram in every output format. The display covers 0–5000 Hz.
Summary
The summary reports preset, source, total output duration, all eight semitone shifts, all eight effective delays, output format, output-object count, channels per object, and the exact voice-to-output mapping.
Output and edge cases
- Input channels: mono and multichannel Sounds are accepted, but processing begins with ordinary
Convert to mono; there is no cancellation-safe strongest-channel fallback in this script. - Voice durations differ: because pitch shifting is varispeed, the eight voices need not end together even if their source and delays are identical.
- Negative delays: allowed by the form; the entire delay set is translated so the earliest voice starts at 0 s.
- Shared level: the same gain is applied to all eight working channels before formatting. This preserves relative balance across stem outputs.
- Stem playback: four-pair and two-quad formats audition a temporary mono downmix of all eight voices. That monitor is removed before the script finishes and is not a deliverable output.
- Selection after completion: all deliverable output objects are selected for the user.