Spectral Freeze Synthesis — User Guide
Evolving spectral peak-hold freeze: dominant peaks are retained, decayed, replaced by stronger peaks, optionally glissandoed, and additively resynthesized.
What this does
Spectral Freeze Synthesis is an evolving peak-hold resynthesizer. It repeatedly analyzes short frames of the source, extracts the strongest spectral peaks, and maintains a bank of held frequencies and amplitudes. Each held amplitude decays over time; a newly measured peak replaces a held slot only when it becomes stronger than that slot's decayed value. The current bank is then resynthesized additively as overlapping Hann-windowed sine grains.
The result can behave like a static drone, a slowly disintegrating spectrum, or a continuously rising/falling spectral cloud. Unlike a conventional FFT freeze that simply repeats one complete analysis frame, this script keeps an evolving ranked bank of dominant peaks.
Peak-hold mechanism
For every analysis frame, the processor searches for the strongest peak below max_frequency_hz, suppresses a neighbourhood around it, then searches again until top_partials peaks have been considered. The suppression width is derived from peak_separation_hz, so nearby peaks are less likely to occupy multiple slots.
decay_factor is therefore a per-second retention ratio, not a per-frame multiplier. A value of 1.0 is an infinite hold; smaller values decay faster. glissando_oct_sec is measured in octaves per second: positive values drift upward, negative values downward.
Quick start
- Select exactly one Sound.
- Run
Spectral_Freeze_Synthesis.praat. - Start with Classic Freeze for a stable held bank, Gentle Decay for a slowly changing texture, or Rising Shimmer for upward drift.
- Use top_partials to control spectral density and peak_separation_hz to control how closely selected peaks may cluster.
- For faster processing, lower resample_to_hz; remember that this also lowers the wet path's Nyquist limit.
- Use tail_duration_sec to allow the held bank to continue after the source ends.
Presets
Presets override only the values listed below. Other form values remain as entered by the user.
| Preset | Overrides | Character |
|---|---|---|
| Custom | None | User settings. |
| Classic Freeze | decay 1.0; gliss 0; 10 partials | Indefinite held-bank sustain until replaced by stronger peaks. |
| Gentle Decay | 0.5; 0; 10 | Slowly fading held spectrum. |
| Rising Shimmer | 0.3; +0.15 oct/s; 12 | Held components drift upward. |
| Falling Shimmer | 0.3; −0.15 oct/s; 12 | Held components drift downward. |
| Ghostly Fade | 0.15; +0.02; 20; tail 4 s | Dense but quickly fading cloud. |
| Metallic Drone | 0.95; 0; 6; max 3000 Hz | Sparse, persistent low/mid spectral bank. |
| Cosmic Drift | 0.4; +0.5; 15; tail 5 s | Large upward glissando. |
| Frozen Choir | 0.8; 0; 16; stereo delay 20 ms; max 4000 Hz | Dense freeze with wider wet-channel phase offset. |
| Disintegrating | 0.05; −0.05; 25; tail 1 s | Many components that vanish rapidly. |
| Ascending to Heaven | 0.6; +0.8; 10; tail 4 s; max 5000 Hz | Strong upward spectral drift. |
| Descending to Hell | 0.7; −0.6; 8; tail 4 s; max 2500 Hz | Strong downward drift concentrated lower in the spectrum. |
| Spectral Dust | 0.02; +0.1; 3; tail 0.5 s | Very sparse, short-lived particles. |
Controls
| Control | Default | Meaning |
|---|---|---|
| frame_step_ms | 20 ms | Distance between analysis/resynthesis frames. |
| analysis_window_ms | 35 ms | Hann analysis window and additive grain duration. |
| max_frequency_hz | 6000 | Upper peak-search and held-frequency limit; capped to the work-rate Nyquist frequency. |
| top_partials | 10 | Number of ranked held slots; values below 1 are forced to 1. |
| peak_separation_hz | 50 Hz | Approximate exclusion width around each selected peak. |
| resample_to_hz | 12000 Hz | Working sample rate for wet analysis and synthesis. Lower values speed processing but remove frequencies above work Nyquist. |
| restore_original_sample_rate | On | Resamples the synthesized wet output back to the source sample rate. It does not restore high frequencies discarded by low-rate analysis. |
| decay_factor | 0.2 | Per-second amplitude retention ratio, capped at 1. |
| glissando_oct_sec | 0 | Exponential frequency drift in octaves per second. |
| wet_dry_percent | 100% | Effect blend, clamped to 0…100. |
| tail_duration_sec | 2 s | Extra analysis/synthesis time after the source, allowing the held bank to continue. |
| create_stereo_output | On | Creates a two-channel wet synthesis. When off, the wet synthesis is mono. |
| stereo_delay_ms | 8 ms | Applied inside the right sine formula as a frequency-dependent phase offset equivalent to a delay; it is not implemented as literal leading silence. |
| target_peak_db | −1 dB | When Wet > 0, non-silent final output is target-normalized to 10^(dB/20). |
| draw_visualization | On | Draws measured held-bank and source/wet/final QC views. |
| play_after | On | Plays the final result after processing. |
Processing pipeline
- Resample a multichannel work copy to
resample_to_hz. - Convert a separate analysis copy to mono. Peak detection is global; the original dry channel structure is kept separately.
- Append the requested tail to the mono analysis signal.
- For each frame, compute a magnitude spectrum, find ranked peaks with spectral suppression, decay/drift the held bank, and replace slots only when the new peak is stronger.
- Resynthesize all active held components as Hann-windowed additive grains and overlap-add them into the wet buffer.
- Optionally resample the wet output back to the original sample rate.
- Mix dry and wet. Beyond the source duration, the dry signal evaluates to zero, so the tail is wet-only.
- If Wet > 0 and the result is non-silent, target-normalize to
target_peak_db.
Channels, bypass, duration and level
- Wet analysis: mono, regardless of source channel count.
- Wet synthesis: mono or stereo according to
create_stereo_output. - Dry path: at original-rate output it comes from the untouched source; at work-rate output it comes from the resampled multichannel work copy.
- More than two source channels: with stereo output, dry channels 1 and 2 are used; with mono output, the dry source is folded to mono.
- Wet = 0: a true bypass. The untouched source is copied with original duration, sample rate and complete channel layout; no tail, pseudo-stereo, resampling or peak normalization is applied.
- Wet > 0 duration: source duration +
tail_duration_sec. - Output name:
<source>_freeze.
Visualization
The visualization is measurement-driven. It records the actual held-bank frequency and amplitude state after every analysis frame, so the trajectory panel is a QC view of the states that drove synthesis rather than an illustrative sketch. Additional panels compare representative source, pure wet and final output measurements.
Technological and compositional context
Spectral freezing belongs to the broader family of frequency-domain sound transformations that became central to computer music through STFT and phase-vocoder techniques. Mark Dolson's 1986 phase-vocoder tutorial framed spectral analysis/resynthesis as a compositional tool capable of manipulating individual spectral components and time/pitch structure.
This processor is not a conventional phase-vocoder frame freeze. Instead of holding a complete magnitude/phase frame, it reduces each frame to a ranked set of strong peaks, carries those peaks forward through decay and glissando, and rebuilds them additively. Compositionally, this turns a momentary spectrum into an evolving harmonic/inharmonic “memory” whose contents may persist, drift, be replaced, or dissolve.
Further reading
Dolson, M. (1986). “The Phase Vocoder: A Tutorial.” Computer Music Journal, 10(4), 14–27. DOI: 10.2307/3680093.