Additive Synth
Synthesise audio by summing harmonic sinusoids.
What it does
Additive Synth gives each value in a NumberArray its own sine-wave oscillator and sums them into a single audio buffer. The first element of the array maps to Frequency Min, the last to Frequency Max. Frequency Scale spreads that range evenly in Hz, evenly in octaves (musical), or on a perceptual Mel scale.
Amplitude Scale sets how loud each bin sounds relative to its input value, so quiet values need not vanish under the loudest ones. Phase Mode sets what each oscillator starts on: smooth continuous tones, diffuse randomised texture, or sharp zero-phase transients. Outputs are a scalar (the last sample) and a full audio-rate buffer.
When to use it
Sonifying an image or any array of numbers: a row of pixels, a curve, or an analysis result turned into audio
Additive and spectral synthesis, many sine oscillators summed from an amplitude spectrum, in the spirit of the ANS synthesiser
Per-bin frequency or phase driven from upstream data instead of the built-in scale and mode, by wiring in a Curve or a per-bin array
| Parameter | Type | Default |
|---|---|---|
input | OneOf([Signal, NumberArray]) | — |
sample_rate | Number | 44100 |
freq_min | Number | 55 |
freq_max | Number | 14080 |
freq_scale | String | "Logarithmic" |
phase_mode | String | "Continuous" |
amplitude_scale | String | "Logarithmic" |
gain | OneOf([Number]) | 0.500 |
normalize | Boolean | true |
freq_curve | OneOf([Curve]) | — |
phase_input | OneOf([Signal, NumberArray]) | — |
Gotchas
Frequency Curve accepts a Curve wired for shape or easing, not an animation curve. It maps normalised bin position (0–1) to a frequency-interp factor, which has no time or frame axis.
Normalize is on by default and rescales the input to 0–1 before synthesis. Turn it off when the data is already normalised, or to let raw values control loudness directly.
Frequency Min maps to the first element of the input array and Frequency Max to the last. The order of the array is the order of the spectrum, low bin to high bin.
Worked example
Add an Additive Synth and wire a NumberArray (for example, one row of pixel brightness values from an image) into Input.
Set Frequency Min and Frequency Max to the pitch range to map the data across, and leave Frequency Scale on Logarithmic for a musical octave spread.
Set Amplitude Scale to Logarithmic so quiet values stay audible alongside bright ones. This is the default choice for sonifying images.
Raise or lower Gain to taste, then read the Buffer output into a mixer or spectrogram to check the result.
See also
Spectrogram · Audio Mixer · Wavetable · Numbers, signals & audio