Giant FFT Recomposer — User Guide

Treats the complete selected Sound as one global complex spectrum and artistically recomposes the relationship between magnitude, phase and frequency — without STFT frames or external processing engines.

Author: Shai Cohen Affiliation: Department of Music, Bar-Ilan University, Israel Version: 0.3.0 (2026) Implementation: Native Praat License: MIT License Category: Global spectral transformation / experimental composition
Contents:

What this does

Giant FFT Recomposer converts the entire Sound — plus an optional appended silent tail — into one complex Fourier spectrum. Instead of analyzing a succession of short windows, it treats the whole duration as a single frequency-domain object. Each preset then changes phase, spectral magnitude, frequency-bin placement, or a combination of these, followed by one inverse transform back to audio.

Global, not frame-based: this is not a phase vocoder and not an STFT processor. There is no local time-frequency grid. Every Fourier bin describes the complete processing duration, so changing its phase can reorganize energy across the entire time span. This is why radical phase operations can dissolve attacks, redistribute events in time, or move energy into the appended tail even when the magnitude spectrum is unchanged.

Key features:

Mono/stereo only: the script accepts one selected Sound with one or two channels. Sounds with more than two channels must be split first.

Quick start

  1. Select exactly one mono or stereo Sound in Praat.
  2. Run Giant_FFT_Recomposer.praat.
  3. Choose a preset. The form opens on Phase Mist.
  4. Leave Transformation_depth = 0.60, Tail_duration_s = 1.50, Preserve_RMS = yes, Fast_FFT = yes and Create_visualization = yes for a first test.
  5. Click OK. The result is named source_GiantFFT_PresetName.
  6. Compare the source and the transformed waveform, then inspect the global spectrum and transformation profile in the Picture window.
Good first comparison: try Original Structure, Phase Mist, Spectral Skeleton and Spectral Mirror on the same short sound. They isolate four different ideas: unchanged complex spectrum, phase-only change, magnitude sparsification, and frequency-axis remapping.
Original Structure is a spectral reference, not necessarily a same-length copy. With the default 1.5 s tail, the result duration is still extended by 1.5 s. Because the spectrum is unchanged, that extra region is normally silent; set Tail_duration_s = 0 when you want the original duration.

Why one giant FFT?

A short-time Fourier transform localizes spectrum in time by analyzing many overlapping windows. Giant FFT Recomposer deliberately removes that local segmentation. If the extended signal is x[n], the script computes one complex spectrum X[k], transforms its magnitude and/or phase, then reconstructs the complete signal with one inverse transform.

Complex spectrum

X[k] = |X[k]| · exp(j φ[k]) where: |X[k]| = magnitude of bin k φ[k] = phase of bin k A transformation may change: • phase only: |X[k]| unchanged, φ[k] replaced or warped • magnitude only: φ[k] unchanged, |X[k]| altered or remapped • complex bins: real and imaginary values copied/blended from other bins • several stages: multiple operations combined before the inverse FFT

DC and a real Nyquist bin are protected in the polar-reconstruction modes. This preserves the real-signal constraints required by the inverse transform.

Why phase is musically powerful here: the magnitude spectrum says how much energy exists at each frequency, but global phase strongly affects how that energy is organized in time. A phase-only transformation can therefore leave the magnitude spectrum essentially unchanged while producing a radically different waveform and temporal character.

Presets

The preset menu contains fourteen named transformations plus Custom. A preset overrides only the parameters needed by that mode; unrelated form fields may remain visible without affecting the selected transformation.

PresetMain operationEffective preset settingsCharacter
Original StructureCopies the original complex spectrumdepth = 0Reference reconstruction through the same global-FFT path.
Phase MistMoves each bin phase toward a random phase targetdepth 0.55; phase disorder 0.55Soft global temporal diffusion.
Deep DissolutionFull random-phase attractiondepth 1.0; phase disorder 1.0Strong destruction of original temporal organization while retaining magnitude.
Phase CrystalQuantizes phase toward discrete angular statesdepth 0.75; disorder 0.90; 8 statesFaceted, structured phase reorganization.
Phase GravityPulls phase toward multiples of π/2depth 0.80; gravity 0.90Strong four-state phase attraction.
Spectral SkeletonAttenuates bins below a global magnitude thresholddepth 0.90; density 0.18Sparse spectral framework dominated by strong components.
ConstellationKeeps/emphasizes strong local spectral peaks and suppresses the restdepth 0.90; density 0.10; peak contrast 1.80Isolated spectral points and resonant traces.
Spectrum DriftCircularly shifts interior spectrum binsdepth 0.80; drift 300 HzFrequency translation by bin remapping.
Spectral MirrorBlends each bin with its reflection around the pivotdepth 0.90; reflection amount 0.95; pivot from formSymmetric redistribution around a chosen frequency.
Spectral FoldTriangular frequency folding around the pivot intervaldepth 0.90; fold amount 0.95; pivot from formRepeated fold-back of upper spectral regions.
Magnitude MutationBlends the magnitude spectrum with a reversed magnitude profiledepth 0.85; magnitude amount 0.90Low/high spectral energy exchange while retaining original phase.
Global FreezeSmooths magnitude across adjacent bins and randomizes phasedepth 0.90; random-phase amount depends on depthGlobally smeared, suspended spectral texture.
Giant CollapseSpectral sparsification + π/2 phase gravitydepth 0.95; density 0.15; gravity 0.95Compressed sparse spectrum with strongly reorganized time structure.
Radical RecompositionDrift + sparsification + phase scalingdepth 0.90; phase scale 2.20; drift 280 Hz; density 0.20Combined large-scale recomposition.
CustomUser-defined staged chainUses the relevant form valuesPhase transform → optional sparsification → optional magnitude mutation → optional drift.
Custom does not include every visible control. It does not perform Spectral Mirror or Spectral Fold, so Pivot_frequency and Fold_depth do not participate in the Custom chain. The pivot is used by the dedicated Mirror and Fold presets.

Transformation modes

Phase Mist / Deep Dissolution

A random target phase is generated for every spectral bin. The original phase moves toward that target along the shortest wrapped angular path.

amount = min(1, depth × phase_disorder) φ_new = φ + amount × wrap(φ_random - φ)

Magnitude is unchanged. At full amount, each processed bin adopts the random target phase.

Phase Crystal

Each original phase is attracted toward the nearest one of Phase_states equally spaced angular states.

phase_step = 2π / Phase_states φ_target = round(φ / phase_step) × phase_step φ_new = φ + amount × wrap(φ_target - φ)

The preset fixes eight states; Custom can use another value when Phase_mode = Quantize (crystal).

Phase Gravity

Phase is pulled toward the nearest multiple of π/2, giving four preferred angular states. In this mode Phase_disorder is not used; the internal gravity amount and Transformation depth determine the attraction.

Time Morph (phase scale)

Used by Custom and Radical Recomposition. Global phase is multiplied by an interpolated scale factor:

factor = 1 + (Phase_scale - 1) × depth φ_new = φ × factor

This is a phase-domain transformation, not conventional time stretching.

Spectral Skeleton

The strongest magnitude in the complete spectrum defines a global retention threshold. Bins below the threshold are attenuated by 1 - depth.

threshold_dB = -6 - 60 × Bin_density threshold = peak_magnitude × 10^(threshold_dB / 20)

Bin_density is an artistic retention control, not an exact percentage of retained bins. Higher density lowers the threshold and retains more spectral content.

Constellation

Only local magnitude peaks that also exceed a global threshold receive emphasis; other bins are attenuated. It therefore extracts and exaggerates a set of strong spectral points rather than merely retaining a fixed number of bins.

Spectrum Drift

The interior spectrum is circularly shifted by approximately Frequency_drift × depth Hz. Positive drift moves content upward in frequency. DC and the real Nyquist bin remain fixed.

Spectral Mirror

Each eligible complex bin is blended with the complex bin reflected around Pivot_frequency. If the reflected location falls outside the valid interior range, the original bin is left unchanged.

Spectral Fold

A triangular bin map repeatedly folds the frequency axis back through the interval defined by the pivot, then blends the folded spectrum with the original. The result is different from a single reflection: higher-frequency regions can fold repeatedly into lower positions.

Magnitude Mutation

The magnitude profile is blended with the same profile reversed across the complete one-sided spectrum, while the original phase is preserved.

|X_new[k]| = (1 - amount)|X[k]| + amount|X[K - k]| phase_new = phase_original

This operation does not use Pivot_frequency.

Global Freeze

Magnitude is first smoothed with a 1–2–1 three-bin kernel, blended with the original according to depth, and combined with a partially randomized global phase field. The operation can strongly smear temporal structure without requiring any STFT freezing process.

Giant Collapse

Combines the Skeleton retention rule with π/2 phase gravity. Weak bins are attenuated while the remaining spectrum is driven toward a highly constrained phase organization.

Radical Recomposition

Combines three stages around a drifted source map: frequency drift, threshold-based spectral retention, and phase scaling. It is deliberately more composite than the single-focus presets.

Parameters

ParameterDefaultValid range / role
PresetPhase Mist14 named modes + Custom.
Transformation_depth0.600–1. Global interpolation/attenuation depth. Most presets override this value.
Phase_disorder0.500–1. Used by random-mist and phase-crystal attraction; not by Phase Gravity.
Phase_modeRandom mistRandom mist / Quantize / Gravity / Time morph. Used by Custom.
Phase_states8At least 2. Number of quantized states for Custom crystal mode; Phase Crystal preset fixes 8.
Phase_scale1.50Phase multiplier target for Custom Time morph; Radical fixes 2.20.
Bin_density0.30>0 to 1. Controls threshold severity for Skeleton-like retention. It is not an exact retained-bin fraction.
Magnitude_amount0.000–1. Optional magnitude reversal blend in Custom; Magnitude Mutation preset fixes 0.90.
Pivot_frequency1000 Hz>0 and below Nyquist. Used by Spectral Mirror and Spectral Fold.
Frequency_drift200 HzDrift amount for Custom; dedicated drift presets override it.
Fold_depth0.500–1. Fold blend parameter, but Spectral Fold preset currently overrides it to 0.95.
Dry_wet_mix1.000–1. Mix transformed output with the extended processing source by sample index.
Tail_duration_s1.50 s≥0. Silent duration appended before the global FFT.
Fadeout_duration_s1.00 s≥0. Half-cosine fade applied only to the appended tail; limited to Tail_duration_s.
Decorrelate_channelsOffFor stereo random-phase modes, choose shared or independent phase fields.
Preserve_RMSOnMatch output-body RMS to source RMS before final peak safety scaling.
Fast_FFTOnPraat zero-pads to a power-of-two internally for speed, then the script trims the IFFT result back to the exact processing duration.
Create_visualizationOnDraw the Praat AudioTools diagnostic page.
Keep_Spectrum_objectsOffKeep source and wet Spectrum objects for each processed channel.
PlayOnPlay the final result after processing.
Random_seed00 = unpredictable. Positive values reproduce random phase fields; with channel decorrelation, channel number offsets the seed.
Parameters are mode-dependent. Seeing a field in the form does not mean the current preset reads it. For example, Pivot_frequency has no effect on Phase Mist, Skeleton or Magnitude Mutation; Random_seed has no effect on deterministic modes such as Mirror, Fold, Crystal or Gravity.

Spectral tail, dry/wet mix & level

Why append silence before the FFT?

Global phase recomposition can relocate energy later in the reconstructed signal. If the transform were computed only over the original duration, that energy would have no explicit post-source region in which to appear. The script therefore optionally concatenates silence before taking the FFT.

processing duration = source duration + Tail_duration_s fade duration = min(Fadeout_duration_s, Tail_duration_s)

The fade is a half-cosine applied only to the end of the appended region. The original-duration body is never attenuated by this tail fade.

Dry/wet behavior

The dry reference for mixing is the extended processing source: original sound followed by the same appended silence. Therefore every mix setting keeps the extended duration whenever Tail_duration_s is greater than zero.

RMS preservation

When Preserve_RMS is enabled, the source RMS is compared with the RMS of only the output's original-duration body. The entire result is then scaled by that ratio. The appended tail is deliberately excluded from the measurement.

Peak safety always remains active. After optional RMS matching, if the final absolute peak exceeds 0.999, the complete result is scaled down so the peak becomes 0.999. This can reduce final RMS below the requested preserved value on high-crest-factor outputs.

Stereo behavior

Left and right channels are transformed separately with the same selected mode and parameters. Deterministic operations therefore preserve channel-specific spectral differences while applying the same rule to both channels.

Random-phase modes are special. With Decorrelate_channels = off (default), one random phase field is shared by both stereo channels. This keeps the random transformation coherent between channels but can narrow the image at high phase-mist depth because both channels are pulled toward the same phase pattern. With Decorrelate_channels = on, each channel receives its own phase field, which can greatly increase stereo decorrelation.

The setting matters only when a mode actually requests random phase: Phase Mist, Deep Dissolution, Global Freeze, and Custom when Phase_mode is Random mist.

For stereo diagnostic spectra, the visualization and centroid report use channel 1 (left), while the waveform panels draw the complete stereo Sounds.

Visualization

With Create_visualization enabled, the Picture window uses the current Praat AudioTools visualization convention.

PanelWhat it showsInterpretation
A — Source waveformOriginal Sound on a shared amplitude scaleNeutral reference for the transformation.
B — Transformed outputMauve original-duration body and rust appended spectral tailShows where transformed energy extends beyond the source and where tail fade begins.
C — Global SpectrumBlue source vs amber transformed magnitude, same relative-dB scaleShows true global spectral redistribution. Each plotted point is the maximum over a block of bins, so sparse peaks are not missed by decimation.
D — Transformation ProfileWrapped phase displacement for phase-oriented modes, otherwise magnitude change in dBShows what the preset actually changed across frequency.
Summary stripPreset, depth, FFT mode, mix, tail, centroid, RMS, peak, duration and processing timeCompact numerical context for the plots.
Sparse-spectrum correctness: the spectrum panel does not point-sample one arbitrary FFT bin at each display step. It takes the maximum over each block of bins, which is essential for Skeleton, Constellation and Giant Collapse where important energy may occupy only a small number of bins.

Applications

Temporal dissolution without changing spectral magnitude

Use Phase Mist or Deep Dissolution. These are useful when the goal is to retain the source's overall spectral-energy distribution while radically reorganizing its time-domain identity.

Sparse spectral composition

Use Spectral Skeleton, Constellation or Giant Collapse to reduce dense material toward a smaller set of strong spectral components.

Frequency-axis recomposition

Use Spectrum Drift, Spectral Mirror, Spectral Fold or Magnitude Mutation when the goal is to alter where spectral energy sits rather than primarily changing phase.

Hybrid transformation

Use Radical Recomposition or Custom when several global operations should interact. In Custom, start with one active stage at a time so the contribution of phase, sparsification, magnitude mutation and drift remains audible.

Long transformed resonance after the source

Increase Tail_duration_s before using strong phase transformations. The tail does not synthesize a reverb by itself; it extends the global transform domain so recomposed energy can occupy time beyond the original ending.

Troubleshooting

Output is longer than the source.
This is expected when Tail_duration_s > 0. Set it to 0 for original duration.
Stereo image narrows in Phase Mist / Deep Dissolution.
Shared random phase can pull both channels toward the same phase pattern. Enable Decorrelate_channels when independent channel phase fields are desired.
Bin_density does not retain the requested percentage of bins.
This is intentional. The parameter controls a dB threshold relative to the strongest bin; it is not a percentile calculation.
Changing Pivot_frequency does nothing.
Pivot_frequency is used by Spectral Mirror and Spectral Fold. It is not part of the Custom chain or most other presets.
Changing Fold_depth seems ineffective in Spectral Fold.
The current Spectral Fold preset explicitly sets its effective fold amount to 0.95. The form value is therefore not used by that preset.
Random_seed has no audible effect.
It only controls modes that generate a random phase field. Deterministic transformations ignore it.
Fast FFT changes the internal FFT size.
This is expected: Praat zero-pads to a power-of-two when Fast_FFT is enabled. The inverse result is trimmed to the exact extended processing duration before mixing and output.