4-Channel Canon
Creates four delayed, independently varispeed-shifted copies of one source and routes them as quadraphonic, two stereo-pair, or stereo-mix output.
What this does
4-Channel Canon always generates four voices from one selected Sound. The source is converted to mono, resampled to the requested working sample rate, copied four times, and each copy receives an independent playback-rate pitch shift and entry delay.
The four delayed voices can remain on four separate channels, be returned as two separate stereo pairs, or be reduced to one stereo mix. There is no independent time-stretch, audio reversal, variable voice count, tempo-sync system, dry/wet control, or phase-vocoder stage in this implementation.
Quick start
- Select exactly one Sound in Praat.
- Run
4-Channel_Canon.praat. - Choose one of the nine named presets or Custom.
- For Custom, set the four Shift_percent values and four entry delays.
- Choose the working Resample_frequency, optional edge-fade time, and output format.
- Enable or disable the visualization and playback, then run the script.
Signal path
Pitch shifting
Pitch and duration therefore change together. Positive percentages raise pitch and shorten the voice; negative percentages lower pitch and lengthen it.
Source channel handling
Any multichannel input is averaged to mono with Praat's Convert to mono before the canon is generated. The current script does not use strongest-channel fallback for phase-cancelling material.
Presets
| Preset | Voice transpositions | Delays (s) |
|---|---|---|
| Custom | Form values; defaults ≈ 0, +1.0, +2.0, −1.0 st | 0.00, 0.30, 0.60, 0.90 |
| Classic Canon | 0, 0, 0, 0 st | 0.00, 0.50, 1.00, 1.50 |
| Octave Stack | +12, 0, −12, −24 st | 0.00, 0.20, 0.40, 0.60 |
| Perfect Fifths | 0, +7, +14, +21 st | 0.00, 0.30, 0.60, 0.90 |
| Major Chord | 0, +4, +7, +12 st | 0.00, 0.25, 0.50, 0.75 |
| Minor Chord | 0, +3, +7, +12 st | 0.00, 0.25, 0.50, 0.75 |
| Cluster | 0, +1, +2, +3 st | 0.00, 0.15, 0.30, 0.45 |
| Wide Spread | −12, −5, +7, +19 st | 0.00, 0.40, 0.80, 1.20 |
| Accelerando Canon | 0, 0, 0, 0 st | 0.00, 0.80, 1.20, 1.40 |
| Reverse Canon | +12, +5, 0, −7 st | 0.90, 0.60, 0.30, 0.00 |
Parameters
| Parameter | Default | Actual behaviour |
|---|---|---|
| Preset | Custom | Custom plus nine named pitch/delay presets. |
| Shift_percent_1 | 0 | Playback-rate pitch offset for voice 1. |
| Shift_percent_2 | 6.0 | Playback-rate pitch offset for voice 2. |
| Shift_percent_3 | 12.0 | Playback-rate pitch offset for voice 3. |
| Shift_percent_4 | −5.5 | Playback-rate pitch offset for voice 4. |
| Delay_1 … Delay_4 | 0.0, 0.3, 0.6, 0.9 s | Absolute entry time for each voice in the output buffer. |
| Resample_frequency | 44100 Hz | Working/output sample rate. Initial source resampling and all pitch-shift resampling use precision 50. |
| Fade_time | 0.01 s | If greater than zero, Praat Fade in and Fade out are applied to each pitched voice before placement. |
| Output_format | 4 channels | 4-channel output, two stereo-pair objects, or one stereo reduction. |
| Draw_visualization | on | Draws the v0.4.1 process/parameter figure. |
| Play_result | on | Plays the Sound stored as result after processing. |
Output formats
4 channels (quadraphonic)
Voice 1 → channel 1, Voice 2 → channel 2, Voice 3 → channel 3, Voice 4 → channel 4. The result is peak-scaled to 0.95 and named <source>_canon4ch_<preset>.
2 stereo pairs
Two separate stereo Sounds are created: voices 1+2 as <source>_canon_pair1_<preset> and voices 3+4 as <source>_canon_pair2_<preset>. Each pair is independently peak-scaled to 0.95.
result variable points to pair 1. Consequently Play_result and the output-waveform visualization use pair 1; pair 2 remains as a separate Sound object in the Objects list.Stereo mix
Voices 1 and 2 are summed into the left channel; voices 3 and 4 are summed into the right channel. The combined stereo Sound is peak-scaled to 0.95 and named <source>_canon_stereo_<preset>.
The nominal output duration is the latest delay + pitched voice duration, plus 0.05 s.
Visualization
The v0.4.1 figure uses an 8-inch suite-standard layout and visualizes the canon structure rather than adding an explanatory text layer.
- Title: source, preset, selected output format, and nominal output duration.
- Canon score: four colored voice bars placed at their true entry delays and extending for their pitch-dependent durations; each bar carries its semitone shift.
- Pitch panel: horizontal bars show the four semitone offsets around a zero reference.
- Delay staircase: shows the four absolute entry delays and their ordering.
- Output waveform: displays channels 1 and 2 of the Sound stored as
resultin blue and orange. In 4-channel mode this is therefore only the first two of four channels; in two-pair mode it is pair 1. - Summary: preset, source, format, duration, sample rate, all four pitch/delay pairs, and fade time.
Limits & edge cases
Shift_percent_n. The playback-rate ratio is 1 + shift/100, so values at or below −100% do not define a valid positive sampling-rate ratio and should not be used.Custom delay fields are also not explicitly constrained to non-negative values. The presets use non-negative delays and the placement logic is designed around entries inside a zero-based output buffer.
Because the source is converted to mono before voice generation, stereo imaging from the input is not preserved. Four-channel separation is created by assigning the four mono canon voices to different output channels.
Peak scaling is always applied to the final result (or independently to each stereo pair). There is no user-facing normalization bypass or dry/wet mix in this version.