Spectral Swirl Multi-Channel

Creates an eight-channel sound from one mono working copy by applying a different full-file sinusoidal spectral-bin warp to each output channel. The eight channels therefore share the same source and duration but differ in spectral redistribution.

Author: Shai Cohen Affiliation: Department of Music, Bar-Ilan University, Israel Version: 0.4.2 (2026) Category: Spatial / Spectral Transformation Praat AudioTools
Contents:

What this does

The script accepts exactly one Sound. If the source has more than one channel, it is first converted to mono. Praat then computes one full-file Spectrum from that mono working copy. Eight output channels are generated from the same immutable source Spectrum, with a different sinusoidal bin-displacement curve for each channel.

This is not an STFT or a time-varying spectral effect. The transformation is calculated once across the frequency-bin axis of the complete file. There are no analysis frames, temporal LFOs, random walks, phase-shear controls, or frequency bands in v0.4.2.

For channel i, two parameters vary systematically:

cycle[i] = Base_cycle + Cycle_increment × (i - 1)
depth[i] = Base_depth + Depth_increment × (i - 1)

This produces an eight-channel family ranging from the first channel's base warp to progressively different spectral mappings in the later channels.

Quick start

  1. Select exactly one Sound in Praat.
  2. Run Spectral_Swirl_Multi-Channel.praat.
  3. Choose a preset, or select Custom.
  4. For Custom, set Base depth, Depth increment, Base cycle, and Cycle increment.
  5. Set the edge fade and Wet/dry percent.
  6. Choose whether to draw the visualization and play the result.
  7. Press OK. The script creates one eight-channel Sound named source_swirl8ch_preset.
Useful starting point: Subtle Shimmer keeps the eight channel mappings relatively close. Deep Swirl and Extreme Chaos use much larger bin displacements and greater inter-channel differentiation.

Processing model

1. Mono working source

Mono input is copied. Any source with more than one channel is downmixed to mono before spectral processing. The original Sound remains in the Objects list.

2. One immutable full-file Spectrum

The mono working Sound is converted once with Praat's To Spectrum: "yes". v0.4.2 keeps this Spectrum unchanged. Each output channel receives its own copy and reads source bins only from the immutable Spectrum.

For output bin k in channel i:

sourceBin = round(k + depth[i] × sin(2π × cycle[i] × k / K))
sourceBin = clamp(sourceBin, 1, K)
Y_i(k) = X(sourceBin)

The same source-bin mapping is applied to the real and imaginary Spectrum rows. Thus each selected source bin contributes its existing complex spectral value; the script does not separately generate new magnitude or phase trajectories.

Meaning of the controls: depth is measured in Spectrum bins. cycle is the number of sinusoidal displacement cycles distributed across the normalized frequency-bin axis. It is not a rate in hertz and does not describe temporal motion.

3. Clamp, not circular wrap

If the displaced index falls below the first bin or above the final bin, it is clamped to the nearest valid bin. The algorithm therefore does not circularly rotate or wrap bins from one spectral edge to the other.

4. Eight inverse transforms

Each warped Spectrum is converted back to a Sound. The eight resulting mono Sounds are then combined into one eight-channel output.

Parameters

ParameterDefaultMeaning
PresetCustomSelects one of six named parameter sets or leaves the four warp controls at the form values.
Base_depth50Bin-displacement amplitude for Channel 1. Positive value.
Depth_increment25Additional displacement depth added for each successive channel.
Base_cycle2Number of sinusoidal displacement cycles across the Spectrum for Channel 1.
Cycle_increment1.0Amount added to the cycle count for each successive channel. This field is a real number and may be negative.
Fade_duration_(s)0.01Linear fade applied to the beginning and end of the wet eight-channel signal when the value is greater than 0 and shorter than half the final duration.
Wet_dry_percent100Linear wet percentage. Values are clamped internally to 0–100.
Draw_visualization1Draws the analysis/output overview in the Picture window.
Play_result1Invokes Praat's Play command on the final eight-channel Sound.
Named presets overwrite only Base depth, Depth increment, Base cycle, and Cycle increment. Fade, wet/dry, visualization, and playback remain whatever you selected in the form.

Presets

PresetBase depthDepth inc.Base cycleCycle inc.
Subtle Shimmer201020.5
Medium Swirl502521.0
Deep Swirl1004031.5
Extreme Chaos2006052.0
Gentle Spatial15510.25
Tight Cluster40530.2

How the preset values expand across channels

For example, Medium Swirl produces:

Channel 1: cycle 2.0, depth 50
Channel 2: cycle 3.0, depth 75
Channel 3: cycle 4.0, depth 100
...
Channel 8: cycle 9.0, depth 225

Wet/dry, fades, and output level

Linear wet/dry mix

The mix law is:

wet = Wet_dry_percent / 100
dry = 1 - wet
output = wet × warped8ch + dry × dry8ch

The dry signal is the same mono working source copied into all eight channels. It is therefore a centered/common eight-channel bed rather than the original multichannel input image.

Fade order

The linear fade-in/out is applied before the dry signal is mixed in. Consequently, at Wet/Dry values below 100%, the dry component is not faded and can remain audible at the file edges.

Final peak scaling

After wet/dry mixing, the complete eight-channel output is always processed with Scale peak: 0.99. This is a single final peak normalization across the combined result and may either attenuate or amplify it. There is no transparent bypass at 0% wet because the dry result is still peak-scaled to 0.99.

Per-channel peak normalization is deliberately not used. v0.4.1 removed it so that level differences created by the eight spectral mappings are not independently erased before the channels are combined.

Visualization

When Draw_visualization is enabled, the Picture window shows:

The displacement panel is a direct picture of the spectral mapping law. Its horizontal axis is normalized frequency-bin position, not time.

Notes & limitations

Very large depth values can produce strong spectral duplication/compression near regions where the mapping folds or reaches the Spectrum boundaries. This is part of the effect rather than a frequency translation with guaranteed spectral continuity.