8-Channel Comb Delay

Creates eight related feed-forward comb-difference channels from one source, with independent divisor-based periods, optional reversal of the even channels, shared-gain normalization, and several multichannel or downmix output formats.

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

What this does

The script selects exactly one Sound, derives a mono working source, and makes eight processed channels. Each channel uses a different divisor to derive a sample offset b. The channel signal is the difference between the current sample and a sample b samples later in the source. The eight channels can then remain separate, be grouped into stereo or quad stems, or be folded down.

What kind of comb is this? This is a two-tap feed-forward difference structure implemented offline in Praat. It does not contain recursive feedback, tempo sync, modulation, filtering, or a feedback matrix.

Quick start

  1. Select exactly one Sound in Praat.
  2. Run 8-Channel_Comb_Delay.praat.
  3. Choose a Preset, or use Custom and enter eight positive divisors.
  4. Optionally enable Reverse_even_channels.
  5. Choose the Output_format.
  6. Set Scale_peak, and choose whether to draw the visualization and play the result.
Default: Custom divisors are 2, 4, 8, 10, 12, 16, 20, 24; reversal is off; output is one 8-channel object; Scale_peak is 0.99.

Comb algorithm

Mono working source

A mono source is used for all eight channels. A multichannel input is converted to mono by Praat's ordinary channel averaging; a mono input is copied.

Divisor to sample offset

For channel i: N = source sample count n_i = selected divisor b_i = floor(N / n_i) if b_i < 1: b_i = 1 For sample column c: if c + b_i <= N: y_i[c] = x[c + b_i] - x[c] else: y_i[c] = -x[c]

The corresponding period displayed in the visualization is b_i / sampleRate seconds. Higher divisors therefore produce smaller b values and shorter comb periods.

Important: the formula reads a later sample (x[c+b]) rather than using a recursive delayed output. It therefore creates an offline feed-forward comb/difference response, not repeating feedback echoes.

Even-channel reversal

If Reverse_even_channels is enabled, the already processed Sounds for channels 2, 4, 6, and 8 are reversed in time. Odd channels remain forward.

Divisor presets

PresetCh1–Ch8 divisors
CustomUses the eight values in the form; defaults: 2, 4, 8, 10, 12, 16, 20, 24
Linear2, 4, 6, 8, 10, 12, 14, 16
Exponential2, 4, 8, 16, 32, 64, 128, 256
Fibonacci2, 3, 5, 8, 13, 21, 34, 55
Prime Numbers2, 3, 5, 7, 11, 13, 17, 19
Octaves2, 4, 8, 16, 2, 4, 8, 16
Dense Cluster2, 3, 4, 5, 6, 7, 8, 9
Wide Spread2, 8, 18, 32, 50, 72, 98, 128
Alternating2, 16, 4, 14, 6, 12, 8, 10
Reverse24, 20, 16, 12, 10, 8, 4, 2
The preset named Reverse reverses the order of the divisor pattern. It is separate from the Reverse_even_channels checkbox, which reverses audio in channels 2, 4, 6, and 8.

Parameters

ParameterDefaultBehaviour
PresetCustomSelects Custom or one of nine fixed divisor patterns.
Delay_1 … Delay_82, 4, 8, 10, 12, 16, 20, 24Positive divisors used only when Custom is selected.
Reverse_even_channelsoffReverses channels 2, 4, 6, and 8 after comb processing.
Scale_peak0.99Target used by the shared-gain stage and, for summed downmixes, by final peak scaling. Values ≤0 are reset to 0.99; values above 1 are clamped to 1.
Output_format8 channels — octophonicSelects one of five output organizations described below.
Draw_visualizationonDraws the 8 × 8 analysis/process figure.
Play_resultonPlays the single output object, or a stereo odd/even monitoring mix when the chosen format creates multiple output objects.

Output formats

FormatObjectsMappingNaming
8 channels — octophonic1 × 8-channelCh1–Ch8 remain Ch1–Ch8<source>_8chComb_<preset>
4 stereo pairs4 × stereoCh1|Ch2, Ch3|Ch4, Ch5|Ch6, Ch7|Ch8..._comb_pair_12_... through ..._pair_78_...
2 quadraphonic groups2 × 4-channelCh1–Ch4 and Ch5–Ch8..._comb_quad_1to4_..., ..._quad_5to8_...
4-channel fold-down1 × 4-channel1=Ch1+Ch5, 2=Ch2+Ch6, 3=Ch3+Ch7, 4=Ch4+Ch8<source>_comb_fold4_<preset>
Stereo mix1 × stereoL=Ch1+Ch3+Ch5+Ch7; R=Ch2+Ch4+Ch6+Ch8<source>_comb_stereo_<preset>

When even-channel reversal is enabled, the stereo mapping places the forward odd channels on the left and the reversed even channels on the right. The four-channel fold-down likewise keeps odd channels with odd and even with even.

Monitoring

For the multi-object formats (four stereo pairs and two quad groups), Play_result auditions a temporary stereo monitor: odd channels are folded to the left and even channels to the right. This monitor is removed afterward and is not one of the output objects.

Normalization

Stage 1 — shared gain

The script measures the peak of all eight processed channels, finds the largest peak, computes one gain Scale_peak / peakAll, and applies that same gain to every channel. This preserves level relationships between the eight comb settings.

Stage 2 — summed downmixes only

The four-channel fold-down and stereo mix sum several channels into each output channel, so the finished object is peak-scaled again to Scale_peak. The octophonic, stereo-pair, and quad-group formats do not receive this second stage.

Visualization

The v0.5 figure uses an 8 × 8 canvas and draws directly from the eight processed working channels, so its content is independent of the selected output format.

Edge cases and interpretation

Multichannel input: the script uses ordinary mono averaging before processing. Opposite-phase material can therefore cancel during fold-down; there is no strongest-channel fallback in this version.
Very large divisor: if floor(N/divisor) would be zero, b is clamped to 1 sample. The Info window reports that this channel has become a first-difference case rather than silence.
Very small divisor / very short source: if b ≥ N, the condition c+b ≤ N is never satisfied and the channel becomes a phase-inverted copy of the source. This is reported in the Info window.
Duration: comb processing and reversal do not add a delay tail. The processed channels retain the source duration.