Advanced Formula Synthesis — User Guide

Generates a new sound from six formula-based synthesis families, with layered variation, bounded modulation, three spatial renderings, reproducible randomization, and measured output visualization.

Author: Shai Cohen Affiliation: Department of Music, Bar-Ilan University, Israel Version: 0.4 (2026) License: MIT License Repo: Praat AudioTools
Contents:

What this does

Advanced Formula Synthesis creates a Sound from mathematical formulas; no input Sound is required. It generates 1–8 layers, sums them to a mono accumulator, applies a fade envelope, optionally renders the result as stereo, optionally normalizes the final output, draws a diagnostic visualization, and can play the result.

The six synthesis families are Simple FM, Competing Oscillators, Nested FM, Harmonic Series, Fibonacci Series, and Evolutionary Formula. The formulas use bounded phase/frequency modulation rather than multiplying elapsed time by a time-varying frequency term, so the intended modulation depth does not grow simply because the sound is longer.

Signal path: parameters → per-layer formula generation → layer sum → linear fade-in/out → Mono / Stereo Wide / Rotating render → optional peak normalization → visualization / playback.

Quick start

  1. Run Advanced Formula Synthesis.praat; no Sound selection is needed.
  2. Choose a Preset, or leave Custom to use the settings below it.
  3. Choose a Synthesis_mode and set the duration, sample rate, base frequency, and layer count.
  4. Use Modulation_depth, Complexity_factor, and Evolution_speed according to the selected mode.
  5. Choose Mono, Stereo Wide, or Rotating.
  6. For repeatable randomized results, enable Randomize_parameters and enter a positive Random_seed.
Default Custom setup: 8 s, 44.1 kHz, 100 Hz, 4 layers, modulation depth 0.6, complexity 1.0, evolution speed 1.0, randomization on with seed 0, Simple FM, 2 s fade, Mono, normalization on, visualization on, and playback on.

Presets

A preset changes only the fields listed below. Sample rate, randomization, random seed, normalization, visualization, and playback remain at the values currently shown in the form unless explicitly listed.

PresetFields overridden
Gentle WavesDuration 10 s; base 150 Hz; 3 layers; depth 0.3; complexity 0.5; Simple FM; Mono.
Golden Ratio DroneDuration 15 s; base 80 Hz; 4 layers; depth 0.4; complexity 1.0; Competing Oscillators; Rotating.
Nested ComplexityDuration 12 s; base 120 Hz; 5 layers; depth 0.7; complexity 1.5; Nested FM; Stereo Wide.
Pure HarmonicsDuration 8 s; base 110 Hz; 6 layers; depth 0.2; complexity 0.8; Harmonic Series; Mono.
Fibonacci BellsDuration 10 s; base 220 Hz; 6 layers; depth 0.3; complexity 1.0; Fibonacci Series; Stereo Wide; fade 3 s.
Slow EvolutionDuration 20 s; base 60 Hz; 3 layers; depth 0.5; evolution speed 0.3; Evolutionary Formula; Rotating; fade 4 s. Complexity is not overridden.
Dense TextureDuration 8 s; base 200 Hz; 8 layers; depth 0.8; complexity 2.0; evolution speed 1.5; Evolutionary Formula; Stereo Wide.

Synthesis modes

1. Simple FM

phase(t) = 2π·fc·t + β·sin(2π·2·t) β = fc·(0.30·depth) / 2

Each layer is one carrier with 2 Hz sinusoidal FM and a slow 0.1 Hz amplitude motion. With randomization enabled, the layer carrier, modulation depth, and phase can differ between layers. The layer amplitude is 0.6 / N.

2. Competing Oscillators

Each layer combines three carriers at 1 : φ : e times that layer’s base frequency, with relative amplitudes 1, 0.5, and 0.3. Their FM rates are 1.5, 2.5, and 0.7 Hz, and Modulation_depth scales all three FM depths. A 0.05 Hz amplitude motion acts on the combined layer.

3. Nested FM

carrier phase + outer modulation whose phase contains an inner modulation

Each layer combines carriers at ×1, ×1.5, and ×2.2. The outer modulation amount follows Modulation_depth; inner modulation amount and rate scaling follow Complexity_factor. The combined layer also receives a 0.08 Hz amplitude motion and a gentle exponential decay across the requested duration.

4. Harmonic Series

fk = k · f0, k = 1…N amplitude = 0.7 / (N · k)

Layer k is the kth integer harmonic of the user’s Base_frequency_Hz. Two slow amplitude terms are scaled by Complexity_factor. Randomization changes the starting phase, but the harmonic frequencies themselves remain exact integer multiples.

5. Fibonacci Series

multipliers = 1, 2, 3, 5, 8, 13, 21, 34… fk = f0 · FibonacciMultiplier(k)

Layers follow Fibonacci multiples of the base frequency, not powers of the golden ratio. Amplitude falls as 0.65 / (N · sqrt(multiplier)). Each carrier has light FM with relative depth 0.20 × Modulation_depth. With randomization off, the FM rate is 1 Hz; with randomization on, each layer receives a rate between 0.5 and 2.0 Hz and a random phase.

6. Evolutionary Formula

Here, “evolutionary” refers to continuous evolution of a fixed synthesis formula over time. Each layer combines four related carriers at ×1, ×4/3, ×5/3, and ×2, with bounded multi-rate FM, separate slow amplitude motions, a global slow amplitude term, and a non-negative exponential decay. Evolution_speed scales the modulation and amplitude-motion rates; Complexity_factor also contributes to the rate scale and decay.

Parameters

ParameterDefaultActual behavior
PresetCustomSelects one of seven partial parameter overrides or keeps the form values.
Duration_s8.0 sDuration of the generated Sound.
Sample_rate_Hz44100Output sampling rate; clamped to 4,000–192,000 Hz.
Base_frequency_Hz100Reference frequency. Its exact role depends on the synthesis mode.
Number_of_layers4Clamped to 1–8.
Modulation_depth0.6Clamped to 0–1. Controls FM/phase-modulation amount in modes 1, 2, 3, 5, and 6. Harmonic Series does not use it in its waveform formula.
Complexity_factor1.0Clamped to 0–5. Used by Nested FM, Harmonic Series, Fibonacci Series, and Evolutionary Formula in mode-specific ways.
Evolution_speed1.0Clamped to 0.01–20. Primarily controls time evolution in Evolutionary Formula; randomized per layer when that mode uses randomized parameters.
Randomize_parametersYesEnables the mode-specific randomized choices described below.
Random_seed00 uses an unpredictable run; a positive value makes the randomized synthesis choices reproducible. Negative values are reset to 0.
Synthesis_modeSimple FMSelects one of the six formula families.
Fade_time_s2 sLinear fade-in and fade-out. If longer than half the duration, it is reduced to duration / 2.
Spatial_modeMonoMono, Stereo Wide, or Rotating.
Normalize_outputYesAfter spatial rendering, applies Scale peak: 0.9. For a non-zero signal this is target peak normalization, not an attenuate-only ceiling.
Draw_visualizationYesDraws the measured waveform, spectrogram, formula mechanism, and QC summary.
Play_resultYesPlays the completed output after visualization.

Randomization and reproducibility

When Randomize_parameters is enabled, the script draws a per-layer base-frequency factor from 0.8–1.2, a modulation-depth factor from 0.7–1.3 (then caps the result at 1), an evolution-speed factor from 0.5–1.5, and a phase from 0–2π. Individual modes use only the randomized quantities relevant to their formulas.

ModeAudible randomized quantities
Simple FMCarrier frequency, modulation depth, phase.
Competing OscillatorsLayer base frequency, modulation depth, phase.
Nested FMLayer base frequency, modulation depth, phase.
Harmonic SeriesStarting phase only; harmonic frequencies remain k × Base_frequency_Hz.
Fibonacci SeriesFM rate (0.5–2.0 Hz) and phase; Fibonacci carrier frequencies remain based on the entered base frequency.
Evolutionary FormulaLayer base frequency, modulation depth, evolution speed, phase.
Seed behavior: with randomization enabled, the same positive seed and the same effective settings reproduce the synthesis choices. Seed 0 requests fresh unpredictable choices. The temporary object-name ID is generated separately and does not define the sound.

Output, anti-alias guards, and spatial rendering

Nyquist-aware guards

The script defines a working limit at 90% of Nyquist. Components whose carrier reaches or exceeds that limit are skipped. In modes with explicit relative FM bounds, modulation depth is reduced when necessary to keep the modeled instantaneous-frequency top within that working limit. The Info window reports the number of depth reductions and skipped components.

Mono

Keeps the summed mono synthesis result as one channel.

Stereo Wide

Creates two copies of the mono result, scales each by 0.8, and applies different Hann pass bands before combining them to stereo. The left channel passes from 0 Hz to up to 4 kHz; the right channel passes from up to 200 Hz to up to 8 kHz. All limits are reduced when required by the selected sample rate. This mode creates stereo contrast through different spectral content in the two channels.

Rotating

L(t) = sqrt[0.5 · (1 + cos(2π·0.2·t))] R(t) = sqrt[0.5 · (1 - cos(2π·0.2·t))]

The mono signal is rendered with complementary equal-power gains at 0.2 Hz: it begins at the left, moves through the center to the right, then returns. The pan cycle is 5 seconds.

Level and format

Duration and sample rate are preserved through the spatial stage. Mono produces one channel; Stereo Wide and Rotating produce two. If normalization is enabled, the completed mono or stereo Sound is then scaled to a target absolute peak of 0.9. The output object is named formula_<preset name>.

Visualization and QC

The visualization is based on the completed output, not on an idealized preview.

A — Measured output waveform
For mono, the output channel is shown. For stereo, the script extracts both channels and displays the one with the higher RMS. The vertical range is set from that displayed channel’s measured peak.
B — Measured spectrogram
Uses the same representative channel as Panel A. The frequency ceiling is limited by 90% of Nyquist and by an internal model-frequency estimate, with a minimum display range of 2 kHz.
C — Formula mechanism
Shows the process chain, a compact governing formula for the selected mode, the realized primary carrier list, and the entered modulation, complexity, and evolution controls.
QC strip
Reports final peak, RMS, internal model-top frequency, spatial mode, anti-alias depth reductions, skipped components, and seed label.
Interpretation: the spectrogram is measured from the output. The displayed model top is the script’s internal synthesis bound/estimate used for visualization and QC; it is not a measured highest spectral component.

Practical notes