Spiral Segmentation — User Guide

Segment-indexed duration and pitch trajectories using Praat DurationTier and PitchTier resynthesis.

Author: Shai Cohen Affiliation: Department of Music, Bar-Ilan University, Israel Version: 1.2.1 (2026) License: MIT License Repo: https://github.com/ShaiCohen-ops/Praat-plugin_AudioTools
Contents:

What this does

Spiral Segmentation divides the source time domain into equal control regions. Each region receives a duration factor and a pitch shift. The regions are not extracted and concatenated as separate grains; instead, their values are written into a shared DurationTier and, when voiced pitch is available, a source-relative PitchTier. Each source channel is then resynthesized with Praat overlap-add.

The duration trajectory is exponential across segment index, with optional Gaussian jitter. Pitch can be additive in hertz or proportional in semitones. The original F0 contour is retained wherever voiced pitch is detected; the segment shift is applied to each original PitchTier point.

Quick start

  1. Select exactly one Sound.
  2. Run Spiral_Segmentation.praat.
  3. Choose a preset or Custom.
  4. Choose Pitch_scaling: Hertz or Semitones.
  5. Set segmentation, duration, pitch and jitter controls.
  6. Run the script. The result is named <source>_spiral.
Important: preset selection changes the segment count, duration trajectory, both pitch-step values, pitch direction and jitter. It does not change the user's Pitch_scaling choice, Preserve_original, Play_result or Show_visualization.

Presets

PresetSegmentsDurationPitch stepPitch directionJitter
Gentle Expansion81.12, expanding3 Hz / 0.25 stRising0.05
Accelerating Collapse161.25, contracting8 Hz / 0.70 stFalling0.06
Pitch Ascent101.05, expanding15 Hz / 1.25 stRising0.03
Pitch Descent101.05, expanding15 Hz / 1.25 stFalling0.03
Drunken Spiral121.18, expanding7 Hz / 0.60 stAlternating0.25
Tight Coil241.08, expanding2 Hz / 0.17 stRising0.02
Wide Orbit61.35, expanding20 Hz / 1.65 stRising0.10
Reverse Time Feel121.20, contracting5 Hz / 0.43 stRising0.08
Glitch Scatter321.10, expanding12 Hz / 1.00 stAlternating0.40
Meditative Stretch61.50, expanding1 Hz / 0.09 stFalling0.02
Anxious Compression201.30, contracting10 Hz / 0.85 stRising0.15
Cosmic Drift81.40, expanding25 Hz / 2.00 stAlternating0.12
Contracting direction: the script does not use multipliers below 1.0. With a multiplier ≥1, Contracting reverses the exponent order: early regions receive the larger duration factors and later regions approach 1.0. It is a decreasing duration-factor trajectory, not necessarily an output shorter than the source.

Parameters

ControlDefaultValidated behavior
Number_of_segments121–512 equal source-time regions
Duration_multiplier1.151–10; exponential base
Spiral_directionExpandingExpanding uses exponent i-1; Contracting uses N-i
Pitch_step_Hz5.0≥0; used only in Hertz mode
Pitch_scalingHertzHertz = additive F0 offset; Semitones = frequency ratio
Pitch_step_semitones1.00–48; used only in Semitones mode
Pitch_directionRisingRising, Falling or Alternating by segment index
Jitter_amount0.080–2; Gaussian multiplier variation
Preserve_originalyesIf off, the selected source Sound is removed after processing

Processing

segmentDuration = sourceDuration / N Expanding: durationFactor[i] = multiplier^(i-1) Contracting: durationFactor[i] = multiplier^(N-i) jittered[i] = durationFactor[i] * (1 + randomGauss(0, Jitter_amount)) jittered[i] is clamped to 0.1 .. 10 Rising: shift[i] = step * (i-1) Falling: shift[i] = -step * (i-1) Alternating: 0, -step, +step, -2*step, +2*step, ...

The DurationTier receives two points inside each segment boundary, so the factor is nearly constant through each region with a short transition near boundaries. Pitch analysis uses a mono reference at 40 Hz to min(1200, 0.45*SR). Synthesis pitch safety is independent: 20 Hz to 0.45*SR.

In Hertz mode, newF0 = originalF0 + shiftHz. In Semitones mode, newF0 = originalF0 * 2^(shiftSt/12). Values outside synthesis safety are clamped. If no voiced pitch is detected, the duration spiral still runs and pitch shifting is skipped.

Each source channel is processed independently with the same shared duration tier and, when available, the same absolute spiral PitchTier derived from the mono analysis. The exact source channel count is rebuilt. Random jitter has no seed control, so repeated runs can differ.

Identity path: Duration_multiplier=1, Jitter_amount=0 and the active pitch step=0 bypass PSOLA and produce an exact copy. The same exact-copy fallback is used when no voiced pitch exists and the duration settings are neutral.

Visualization

Output