Synthesis Engines

Beepscript includes three synthesis engines. Each engine is selected per-atom in the Lua configuration block, so different voices in the same piece can use different engines simultaneously. All released engines run in real-time in the browser via WebAssembly.

Basic Engine (Subtractive Synthesis)

The default engine. Generates audio by shaping harmonically-rich oscillator waveforms with filters and envelopes — the same approach used in classic analog synthesizers.

Oscillators

Five pitched waveform types: sine, saw, square, triangle, and noise. Each oscillator takes a frequency parameter in Hz. Multiple oscillators can be mixed, detuned, or layered within a single atom.

Noise generators

Six noise colors with distinct spectral profiles: noise/white_noise (flat spectrum), pink_noise (1/f, −3dB/octave — natural, balanced), brown_noise (1/f², −6dB/octave — deep, rumbling), blue_noise (f, +3dB/octave — bright, thin), and violet_noise (f², +6dB/octave — very bright). Noise generators combine with filters and envelopes for percussion, wind, ocean, rain, and textural effects.

Filters

Six filter types: low-pass (lpf), high-pass (hpf), band-pass (bpf), notch (notch), all-pass (allpass), and formant (formant). All support cutoff frequency and resonance (Q) parameters, plus optional key-following so the cutoff tracks pitch. The formant filter models vocal tract resonances with twelve phoneme presets (vowels and nasals) and a tract-shift parameter that slides all formant frequencies up or down in semitones — from deep bass voices to small, bright timbres. Morphing between formant vowels produces vowel-like transitions.

Envelopes

ADSR envelopes control amplitude over time: attack (ms), decay (ms), sustain (level 0–1), release (ms). The env() function wraps any signal source with an envelope. Envelopes can also modulate filter cutoff for dynamic timbral changes.

LFOs

Low-frequency oscillators for modulation: lfo_sine, lfo_square, lfo_smooth_random, and others. LFOs modulate pitch (vibrato), amplitude (tremolo), or filter cutoff (wah) at sub-audio rates.

Typical uses

UI sound effects, notification tones, pads, leads, bass, alarm sounds, ambient textures. The basic engine covers the widest range of sound design tasks.

FM Engine (Frequency Modulation)

A four-operator FM synthesizer inspired by the Yamaha DX7. Operators modulate each other's frequencies to produce complex harmonic and inharmonic spectra that are difficult to achieve with subtractive synthesis alone.

Operators and algorithms

Four operators, each with its own frequency ratio, amplitude envelope, and output level. Eight routing algorithms define how operators connect: some in series (modulator chains), some in parallel (additive), and hybrid configurations. The algorithm selection determines the fundamental character of the sound.

Parameters

Per-operator controls: frequency ratio (relative to the fundamental), modulation index (depth of frequency modulation), feedback amount, and ADSR envelope. Higher modulation indices produce more harmonics; lower indices produce purer tones.

Typical uses

Electric pianos, metallic bells, glass-like tones, percussive attacks, brass-like timbres, and inharmonic textures. FM excels at sounds with strong transients and complex overtone structures.

Stringed Engine (Digital Waveguide)

A physical model of vibrating strings using the Karplus-Strong algorithm and digital waveguide extensions. The engine simulates the excitation, propagation, and damping of waves on a string, producing naturally decaying plucked or bowed sounds.

Instrument presets

Fifteen presets, each tuned with different excitation, damping, body resonance, and string characteristics:

Bend techniques

The notation system supports pitch bend operators (| bend up +2st, \ bend down −2st, cumulative) and pre-bend syntax (|c\ starts bent then releases) that interact naturally with the waveguide model for expressive string performance.

Typical uses

Acoustic instrument emulation, plucked-string textures, temple bells (via tanpura), drone backgrounds, and any sound that benefits from the natural decay and resonance of a physical string model.

← Back to About