Subtle Random Texture — User Guide

Smooth random, phase-preserving spectral colouration with optional time-evolving blends between full-file FFT states.

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

What this does

Subtle Random Texture creates smooth, random spectral colouration. Each processed copy receives a set of Gaussian-shaped boosts and cuts at random centre frequencies. The same positive gain is applied to the real and imaginary components of every FFT bin, so the existing bin phase is preserved while spectral magnitude is reshaped.

With one time segment the colour is static. With two or more segments, the script generates several complete full-file FFT colourations and blends them over time with triangular weights. This creates gradual timbral drift without windowed grain extraction or overlap-add reconstruction.

What does “spectral colouration” mean? It means changing the relative strength of frequency regions without replacing the source or imposing a new pitch contour. Here the colour is generated by smooth random resonant features. “Resonance” is descriptive: the processor is not modelling a physical resonator, room, or vocal tract.

Quick start

  1. Select exactly one mono or stereo Sound.
  2. Run Subtle_Random_Texture.praat.
  3. Choose a preset. Subtle Shimmer is a useful starting point; Frozen Colour gives a static filter-like colour.
  4. Use Time segments to control how many independently random spectral states are blended across the file.
  5. Set Wet/Dry, then run the script. The result is named originalName_PresetName.
Randomness: there is no exposed random seed. Running the same settings again can produce a different spectral texture. Stereo channels receive independent random draws for decorrelation.

How the random spectral envelope works

For each resonance, the script draws a random centre frequency fc and a random signed depth. Odd-numbered features are boosts and even-numbered features are cuts. The spectral gain is:

G(f) = max(0.05, 1 + Σ aᵣ · exp(-((f - fᶜᵣ) / BW)²))

The 0.05 floor prevents polarity inversion. Low/High frequency define the range from which the random centre frequencies are drawn; Gaussian tails can extend outside that range. Bandwidth Hz is the scale parameter used by the Gaussian formula, not a measured filter FWHM.

Evolving mode

For N ≥ 2, the script does not split the source into N audio segments. It makes N complete FFT-processed copies of the entire source, each with a different random spectral envelope, then blends those copies with triangular weights. Adjacent weights sum to 1 at every time point; for N=2 the blend is a simple linear crossfade.

Presets

PresetResonancesBWDepthCentre rangeSegments
Custom8100 Hz2.080–10000 Hz4
Subtle Shimmer6150 Hz1.0200–10000 Hz6
Warm Resonance680 Hz2.5150–5000 Hz3
Evolving Texture10100 Hz2.0100–10000 Hz8
Lo-Fi Character840 Hz4.0200–6000 Hz4
Spectral Chorus16200 Hz1.580–14000 Hz6
Frozen Colour860 Hz3.0100–10000 Hz1

Presets replace the resonance and time-variation parameters above. Wet/Dry and output controls remain user controls.

Controls

ControlMeaning
Number of resonancesNumber of Gaussian gain features in each random spectral state.
Bandwidth HzWidth scale in the Gaussian gain law. Smaller values make narrower, more selective colouration.
DepthScales the random boost/cut amplitudes. Overlapping features can combine; cuts are floor-limited by the final gain law.
Low / High freq HzRandom centre-frequency range. The upper value is automatically reduced when necessary to remain below Nyquist.
Time segmentsNumber of full-file random colourations. 1 = static; 2+ = time-varying blend.
Wet/Dry percentBlend before final level scaling. 0% is a true dry bypass.
Scale peakFor every nonzero wet amount, the final result is target-normalized to this peak value.

Processing pipeline

  1. Validate one mono/stereo input and clamp the random centre-frequency range to the available Nyquist region.
  2. For each channel and each spectral state: full-file FFT → random smooth gain envelope → inverse FFT → trim FFT padding.
  3. If multiple states are requested, blend their complete time-domain copies with a partition-of-unity triangular crossfade.
  4. For stereo input, repeat the process independently for left and right channels.
  5. Apply Wet/Dry.
  6. If Wet = 0, copy the original exactly and skip peak scaling. Otherwise target-normalize the final output to Scale peak.

Channels, duration, sample rate and level

Visualization

The four-panel display is mechanism-first:

For stereo processing, the plotted random envelopes are the left-channel realization; the right channel is independently randomized and therefore intentionally different.