AM Additive Synthesis Generator — User Guide

Praat script.

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

What this does

Praat script.

Process Description: This script primarily uses the Formula: "self + ... sin(...)" command within a loop to stack multiple sine waves on top of each other, which is the definition of additive synthesis. The various texture_type options demonstrate creative ways to define the frequency and amplitude of these stacked partials.

Technical details: This Praat script implements a comprehensive additive synthesis engine offering fifteen spectral construction algorithms paired with ten amplitude envelope options, generating complex timbres through iterative accumulation of sinusoidal partials at 44.1 kHz sample rate. The synthesis architecture operates through two-stage processing: first, spectral content generation via iterative formula application where each partial is added to an initially silent sound buffer using the accumulator pattern self + amplitude × sin(2π × frequency × t); second, envelope shaping through global amplitude modulation applied to the complete summed spectrum. The fifteen texture modes implement distinct frequency distribution and amplitude weighting strategies: Harmonic Series generates integer multiples with 1/n amplitude falloff producing sawtooth-like spectra; Odd/Even Harmonics create square-wave and missing-fundamental timbres respectively through selective harmonic inclusion; Inharmonic Cluster applies Gaussian frequency jitter (freq = fundamental × (n + chaos × N(0,0.5))) for metallic coloration; Golden Bells uses exponential frequency spacing (φ^(n-1) where φ=1.618) with exponential amplitude decay (1/2^(n-1)) creating bell-like inharmonic relationships; Octave/Fifth Stacks generate geometric series at 2:1 and 3:2 ratios respectively for pure interval stacking; Shepard Tone implements circular pitch perception through octave-spaced partials with sinusoidal amplitude windowing (sin(π × octave_position)) and subtle frequency gliding; Spectral Comb creates evenly-spaced partials with chaos-dependent spacing (2-5× fundamental) for formant-like resonances; Random Cloud distributes frequencies uniformly across 0.5-4× fundamental range with randomized amplitudes; Detuned Unison generates narrow-bandwidth chorus through linear frequency spreading around the fundamental; Harmonic Decay applies partial-dependent exponential envelopes (exp(-t × n × 0.5)) creating spectrally evolving timbres where higher harmonics decay faster; Rising Partials implements frequency gliding (freq × (1 + chaos × 0.5 × t) × t) creating upward pitch sweeps with chaos-controlled glide rate; Filtered Spectrum applies Gaussian amplitude weighting centered at mid-spectrum with chaos-dependent bandwidth, simulating resonant filtering; and Chaotic Swarm combines amplitude jitter, frequency modulation (freq × (1 + chaos × sin(10n × t))) and time-varying chaos for complex evolving textures. The ten envelope options provide temporal shaping: Percussive applies fast exponential decay (exp(-5t)); Slow Fade uses gentle decay (exp(-0.3t)); Gate creates rhythmic on/off pulsation through thresholded sinusoidal modulation; Reverse implements linear crescendo; Tremolo applies amplitude modulation at 5-20 Hz with 30-80% depth; Swell creates attack ramp with chaos-dependent rise time; ADSR implements traditional four-segment envelope (attack/decay/sustain/release) with chaos-scaled segment durations; Stutter generates rapid amplitude gating at 10-40 Hz through modulo arithmetic; and Random Bursts creates stochastic grain-like amplitude events with exponential decay per burst. All envelope formulas operate through global multiplication preserving spectral balance while sculpting overall amplitude contour. The script performs iterative additive synthesis without intermediate object creation, building the complete spectrum through sequential formula modifications, then applies single-pass envelope shaping and peak normalization to 0.95. This architecture produces timbres ranging from pure harmonic tones through complex inharmonic spectra to chaotic clouds, with envelope options enabling percussive strikes, sustained drones, rhythmic pulsations, or stochastic textures—suitable for subtractive synthesis replacement, spectral composition, FM alternative approaches, algorithmic sound design, and educational demonstrations of Fourier synthesis principles where complex timbres emerge from summed sinusoids with carefully designed frequency relationships and amplitude distributions.

Quick start

  1. In Praat, select a Sound object.
  2. Run script…AM Additive Synthesis Generator.praat.
  3. Set parameters and click OK.
  4. Output object appears (see Outputs).

Parameters (form fields)

Name (GUI)TypeDefault
texture_type:choice1
durationpositive3.0
fundamentalpositive220
num_partialspositive8
detunereal0.1
chaosreal0.3
envelope:choice1

Outputs