Stereo Delay Splitter — User Guide

Applies two forward-difference comb-filter passes independently to the left and right channels, with separate delay times and an adjustable wet/dry mix. Delays can be derived from file duration, fixed milliseconds, or manual-BPM note values.

Author: Shai Cohen Affiliation: Department of Music, Bar-Ilan University, Israel Version: 0.6.2 (2026) License: MIT License Repo: GitHub

What this does

Stereo Delay Splitter creates a stereo result in which the left and right channels pass through the same two-stage difference structure but use independent delay values.

source → stereo preparation → split L / R L: D1 difference → D2 difference → wet/dry mix R: D1 difference → D2 difference → wet/dry mix → combine to stereo → target peak scaling

Different L/R delay geometries produce different comb responses in the two channels. The output keeps the source duration and sample rate.

Quick start

  1. Select exactly one Sound object. Mono and multichannel input are accepted.
  2. Run Stereo_Delay_Splitter.praat.
  3. Choose Custom or one of the four divisor presets.
  4. Choose Delay_mode: Divisor, Milliseconds, or Tempo-synced.
  5. Set the corresponding delay controls.
  6. Set Wet_dry from 0 for dry to 1 for fully processed.
  7. Run. The result is named <source>_stereo_split.
The four named presets set the divisor values only. They are therefore directly active in Divisor mode; Milliseconds and Tempo-synced modes use their own delay controls.

Two-stage difference filter

Each channel is processed twice. For one pass with delay D samples:

if n + D is inside the Sound: y[n] = x[n+D] - x[n] otherwise: y[n] = x[n]

The delayed term is a forward read: the filter compares the current sample with a later sample in the Sound. This is an offline, noncausal FIR operation.

Interior four-tap structure

Where both passes have valid forward reads, applying delays D1 and D2 in sequence gives:

y[n] = x[n] - x[n+D1] - x[n+D2] + x[n+D1+D2]

The corresponding four tap positions are 0, D1, D2 and D1+D2 with signs +, −, −, +.

End-of-file behavior

Each pass leaves a sample unchanged whenever its own forward read would exceed the Sound. The transition near the end is therefore pass-dependent rather than padded, wrapped, or truncated. If a requested delay is at least the complete file length, that entire pass becomes a no-op for the channel.

Delay modes

Divisor — fraction of file

D = round( totalSamples / divisor )

The absolute delay therefore scales with source duration. For a source of duration T, the approximate delay is T/divisor.

For one difference stage, the comb spacing is approximately:

spacing ≈ divisor / sourceDuration Hz

With long files and small divisors this spacing can become very dense, producing broad decorrelation/coloration rather than a small set of widely spaced tonal notches.

Milliseconds

D = round( Delay_ms / 1000 × sampleRate )

Each channel has two independent fixed-millisecond controls. Short delays produce more widely spaced comb notches.

Tempo-synced

quarterBeat = 60 / Manual_bpm D = round( noteBeats × quarterBeat × sampleRate )
Note optionQuarter-note beats
1/22
1/41
1/4 dotted1.5
1/80.5
1/8 dotted0.75
1/160.25
1/16 dotted0.375
1/320.125
Manual_bpm supplies the timing reference directly. The script does not analyze the Sound for tempo, beats, meter, or note values.

All four calculated delays are clamped to at least one sample.

Wet/dry mix

After the two filter passes, each processed channel is mixed with its own untouched pre-processing channel:

output = processed × Wet_dry + dry × (1 - Wet_dry)

Wet_dry is internally clamped to 0…1.

Wet_dryResult
0Original stereo preparation only.
0.5Equal linear mix of dry and processed signals.
1Fully processed two-stage difference filter.

Input-channel behavior

InputProcessing source
MonoThe mono Sound is duplicated into identical L and R channels before independent processing.
StereoChannel 1 becomes L and channel 2 becomes R.
3+ channelsOnly channels 1 and 2 are used for the stereo result.

The result is always a two-channel stereo Sound.

Divisor presets

PresetLeft divisorsRight divisors
Default2, 48, 10
Narrow Stereo3, 56, 8
Wide Stereo2, 612, 18
Alt Divisors2, 39, 15

The presets overwrite only Divisor_L1, Divisor_L2, Divisor_R1 and Divisor_R2. Delay_mode, millisecond delays, BPM/note values, Wet_dry, Scale_peak, visualization and playback remain unchanged.

Parameters

ParameterDefaultExact role
PresetDefaultFour divisor presets plus Custom.
Divisor_L1 / L22 / 4Left-channel file-fraction delays in Divisor mode.
Divisor_R1 / R28 / 10Right-channel file-fraction delays in Divisor mode.
Delay_modeDivisorDivisor, Milliseconds, or Tempo-synced.
Delay_L1_ms / L2_ms3 / 5 msLeft delays in Milliseconds mode.
Delay_R1_ms / R2_ms7 / 11 msRight delays in Milliseconds mode.
Manual_bpm120Tempo reference for Tempo-synced mode.
Note_L11/8Left first note-value delay.
Note_L21/16Left second note-value delay.
Note_R11/4Right first note-value delay.
Note_R21/8 dottedRight second note-value delay.
Wet_dry1.0Linear dry/processed mix; internally clamped to 0…1.
Scale_peak0.99Final target Sinc70 peak for non-silent output.
Draw_visualizationOnDraw process geometry, waveforms, spectra and summary.
Play_resultOnPlay the completed result.

Final peak scaling

After L and R are recombined, the script measures the Sinc70 absolute extremum. For a non-silent result it applies:

Scale peak: Scale_peak

This is target peak normalization. With the default setting, any non-zero result is scaled to a Sinc70 peak of 0.99.

Visualization

The v0.6.2 Picture view represents both the process and its spectral consequence:

  1. Source waveform — the original selected Sound.
  2. Stereo delay geometry — L and R lanes show their actual D1, D2 and D1+D2 positions on one shared millisecond axis.
  3. Stereo result waveform — completed processed Sound.
  4. Original spectrum and Split spectrum — mono display folds, capped at min(5 kHz, Nyquist).
  5. Summary strip — actual L/R delays and wet/dry percentages.

Four-tap geometry

Each lane shows the composed two-pass kernel:

0 D1 D2 D1+D2 + − − +

Filled markers represent positive taps; ring markers represent negative taps. L and R use the same sign pattern but different horizontal spacing.

Waveform scale

Source and Result use the same amplitude range derived from the larger Sinc70 peak, with 5% display headroom.

Spectrum panels

Both spectra are display-only mono folds. They show the overall spectral effect of the two-channel processing, while the central delay geometry preserves the separate L/R structure.

Output behavior