Work in progress Fledgetone is still being built, so things may change or break.

Tools Fledge effects

Fledge effects

Download fledgetone-fledge-effects.zip (1.3 MB) README.md

Part of Fledgetone (https://fledgetone.com), © Martin Swanson, MIT licence. Source code: https://github.com/martinmswanson-cmd/fledgetone

Fledgetone's own effects, built to WebAssembly, with a small wrapper so you can use them in any web page or browser game through the Web Audio API. Three of them can listen to a second sound (a sidechain): the compressor ducks under it, the gate opens on it, and the vocoder takes it as its voice.

What's in this zip

FileWhat it is
fledge-effects.jsThe wrapper you import (main thread)
fledge-effects-processor.jsIts AudioWorklet processor, which runs an effect
fledge-compressor.wasmFledge Compressor, compiled to WebAssembly
fledge-gate.wasmFledge Gate, compiled to WebAssembly
fledge-vocoder.wasmFledge Vocoder, compiled to WebAssembly
fledge-repeat.wasmFledge Repeat, compiled to WebAssembly
fledge-harmony.wasmFledge Harmony, compiled to WebAssembly
fledge-shifter.wasmFledge Shifter, compiled to WebAssembly
fledge-spectral.wasmFledge Spectral, compiled to WebAssembly
fledge-smooth.wasmFledge Smooth, compiled to WebAssembly
fledge-carve.wasmFledge Carve, compiled to WebAssembly
fledge-eq.wasmFledge Dynamic EQ, compiled to WebAssembly
fledge-heat.wasmFledge Heat, compiled to WebAssembly
fledge-shape.wasmFledge Shape, compiled to WebAssembly
index.htmlAn example page: a chord and a kick through the effect you choose
source/The effects' Rust source code, to build the .wasm files yourself
LICENSEThe MIT licence

Try it

Serve this folder and open index.html (AudioWorklets don't run from a file:// page):

npx serve

Use it

import { FledgeEffect } from './fledge-effects.js';

const context = new AudioContext();
const comp = await FledgeEffect.create(context, 'compressor', { preset: 'Duck under the kick' });
bass.connect(comp.node);                          // the sound to treat goes into the node...
comp.connect(context.destination);                // ...and comes out of it
comp.setSidechain(kick);                          // the sound it listens to (any AudioNode)

comp.setParam('Threshold', 0.4);                  // every parameter is 0 to 1
comp.setParam('Key listen', true);                // a switch takes true or false
console.log(await comp.describe());               // each with the text it shows: "-36.0 dB"
await comp.setPreset('Gentle glue');

The effects are 'compressor', 'gate', 'vocoder', 'repeat', 'harmony', 'shifter' and 'spectral'. The calls:

CallWhat it does
FledgeEffect.create(context, kind, options?)Makes an effect. Options: preset (name or number), tempo (BPM), wasmUrl, processorUrl
effect.nodeThe AudioWorkletNode: connect the sound to treat to it
connect(node), disconnect()Where its stereo sound goes
setSidechain(node)The sound it listens to, or null for none. Only the compressor, the gate and the vocoder listen (effect.listens)
setParam(name, value, time?), getParam(name)A parameter, 0 to 1 (or true/false). time is on the audio clock (context.currentTime), now if left out
listParams(), describe()The parameters' names; every parameter now, with the text the effect shows for it
listPresets(), setPreset(name)The presets; choose one (it sets every parameter)
setTempo(bpm), setPosition(beats, time?), stop(time?)For the beat repeat (effect.followsSong): the tempo, where the song is, and that it has stopped
effect.infoIts name and what it does
destroy()Free the effect

They work in an OfflineAudioContext too, to render sound to a buffer.

Things to know:

The effects

Every parameter is a number from 0 to 1. Knobs go from their lowest to their highest setting; switches are off below 0.5 and on above; a choice's options are spread evenly from 0 to 1. Starts at is how each is set when the effect is made (before a preset is chosen).

Fledge Compressor

FledgeEffect.create(context, 'compressor'). A clean stereo compressor with a sidechain: pick another track under "Sidechain from" and this one ducks to it (a bass under the kick, the music under a voice). With no sidechain it follows its own sound. Soft knee, a high-pass on what it listens to, parallel mix, no added delay. Listens to a sidechain.

#ParameterStarts at
0Threshold-18.0 dB
1Ratio4.0:1
2Attack10 ms
3Release120 ms
4Knee6.0 dB
5Make-up0.0 dB
6Key high-passOff
7Mix100 %
8Key listenOff

Presets: Gentle glue, Duck under the kick, Music under a voice, Hard pump, Tight drums.

Fledge Gate

FledgeEffect.create(context, 'gate'). A gate with a sidechain: it lets this track through while what it listens to is over the threshold, and turns it down by the Range while it isn't. By itself it cleans up a recording. Pick another track under "Sidechain from" and this track is chopped to that one's rhythm (a pad on the hats, a bass with the kick); Flip silences it under the other track instead. Hold and hysteresis keep it from chattering; no added delay. Listens to a sidechain.

#ParameterStarts at
0Threshold-40.0 dB
1RangeShut
2Attack1.0 ms
3Hold30 ms
4Release120 ms
5Hysteresis3.0 dB
6Key high-passOff
7FlipOff
8Key listenOff

Presets: Clean up a recording, Tight drums, Chop to the other track, Chop to the hats, Silence under the other track.

Fledge Vocoder

FledgeEffect.create(context, 'vocoder'). A vocoder that takes its voice from another track: put it on a synth, a pad or a saw bass (the carrier), pick the track with speech, singing or drums under "Sidechain from" (the voice), and the synth's notes come out shaped like the voice's words. 8 to 32 bands, a formant shift for bigger and smaller voices, and the voice's own consonants let through for clear words. With no sidechain the track passes through as it is. Listens to a sidechain.

#ParameterStarts at
0Bands16
1Response25 ms
2Formant0 st
3Sibilance20 %
4Mix100 %
5Level+0.0 dB

Presets: Talking synth, Clear words, Old robot, Giant, Small voice.

Fledge Repeat

FledgeEffect.create(context, 'repeat'). A beat repeat in time with the song: while it's on, the slice of sound that comes in next (a 16th note, say) plays again and again in place of the track. A stutter, a drum roll, a glitch. Switch it on with Repeat (draw it in an automation lane), or let Every do it by itself at the end of every bar or every few bars, as a fill into the next phrase. Gate cuts each repeat short, Decay fades them, Pitch moves each one up or down. No added delay. Follows the song's tempo and position.

#ParameterStarts at
0RepeatOff
1EveryOff
2For1/4
3Slice1/16
4Gate100 %
5Decay0 %
6Pitch0 st
7Chance100 %
8Mix100 %

Presets: Stutter when switched on, Fill before every 4th bar, Roll into the next bar, Falling away, Rising glitch, Now and then.

Fledge Harmony

FledgeEffect.create(context, 'harmony'). Harmony voices from one sung or played line: it follows the pitch of a voice or a lead (one note at a time) and adds up to two voices above or below it, in the song's key, so a "third above" stays in the scale at every note. The added voices keep the original's character (a voice shifted up doesn't turn into a chipmunk); Formant changes it on purpose, for a bigger or smaller voice. Set Key and Scale to the song's. The added voices come a few milliseconds behind the line and rest where it has no clear pitch.

#ParameterStarts at
0KeyC
1ScaleMajor
2Voice 1+2 steps
3Voice 1 level70 %
4Voice 2+4 steps
5Voice 2 level0 %
6Dry100 %
7Formant0 st
8Spread50 %
9Detune6 cents

Presets: A third above, Third and fifth above, A third above, a fourth below, Octave below, Octaves above and below, Thicker double.

Fledge Shifter

FledgeEffect.create(context, 'shifter'). A frequency shifter: every frequency is moved by the same number of hertz (a pitch shifter multiplies them), so a note's overtones go out of tune with it and it turns bell-like and metallic. A hertz or less, mixed half and half, is a phasing that only ever rises or falls; Spread shifts the right side the other way; Feedback through the Delay shifts each echo again, spiralling up or down.

#ParameterStarts at
0Shift+100 Hz
1Spread0 %
2Feedback0 %
3Delay20 ms
4Mix100 %

Presets: Metallic, Endless phasing, rising, Endless phasing, falling, Wide and uneasy, Spiralling echoes, Bell tones.

Fledge Spectral

FledgeEffect.create(context, 'spectral'). Works on a sound by its spectrum, each frequency on its own. Gate takes out what's quieter than a threshold (hiss under a held note goes, the note stays). Blur smooths each frequency over time, into a wash that lingers. Smear spreads each frequency over its neighbours, turning pitches breathy. Freeze is a switch: while it's on, the sound of that moment is held and goes on sounding. The sound comes out a frame late (43 ms at 48 kHz).

#ParameterStarts at
0FreezeOff
1GateOff
2Blur0 %
3Smear0 %
4Mix100 %

Presets: Freeze when switched on, Wash, Take out the hiss, Only the loud parts, Breath, Ghost.

Fledge Smooth

FledgeEffect.create(context, 'smooth'). A resonance suppressor: it listens in 28 narrow bands and turns a band down only while it stands out from the bands around it, and only by as much as it does. For a harsh supersaw, a whistle in a growl bass, one booming bass note, the bite of a vocal. Depth is how much; "Stands out by" is how far over its neighbours a band must be before it's touched; From and To keep it to a range; "Removed only" plays only what it takes out. No added delay.

#ParameterStarts at
0Depth50 %
1Stands out by4.0 dB
2Attack10 ms
3Release150 ms
4From60 Hz
5To16.0 kHz
6Removed onlyOff

Presets: Tame a harsh synth, Soften a vocal, A bass that booms on one note, Smooth the whole mix, gently, Hard, for sound design.

Fledge Carve

FledgeEffect.create(context, 'carve'). Makes room for another track: pick it under "Sidechain from", and this track is turned down only at the frequencies that one is using, band by band, while it plays. A pad under a vocal keeps its lows and its air; a bass under a kick loses only the thump. Amount is the most a band is turned down; Threshold is how loud the other track must be in a band before it counts; From and To keep it to a range; "Removed only" plays only what it takes out. With no sidechain it does nothing. No added delay. Listens to a sidechain.

#ParameterStarts at
0Amount8.0 dB
1Threshold-40.0 dB
2Attack10 ms
3Release150 ms
4From60 Hz
5To16.0 kHz
6Removed onlyOff

Presets: Room for a vocal, Bass under the kick, Pads under the lead, Music under speech, Deep carve.

Fledge Dynamic EQ

FledgeEffect.create(context, 'eq'). Four bells that can move with the sound. Each has a frequency, a gain and a width, like any equaliser band. Give one a "moves by" amount and a threshold and it turns that much further as the sound in its own range gets loud, and eases back as it falls: down for a de-esser or a boom tamed only on the notes that boom, up for a part that opens as it's played harder. "Works on" sends a band to both sides, to the Mid (the centre) or to the Side (the width): lift the Side's top for a wider mix, or cut the Side's lows to keep the bass in the middle. No added delay.

#ParameterStarts at
0Band 1 frequency100 Hz
1Band 1 gain+0.0 dB
2Band 1 width1.00
3Band 1 moves byOff
4Band 1 threshold-30.0 dB
5Band 1 works onStereo
6Band 2 frequency500 Hz
7Band 2 gain+0.0 dB
8Band 2 width1.00
9Band 2 moves byOff
10Band 2 threshold-30.0 dB
11Band 2 works onStereo
12Band 3 frequency2.50 kHz
13Band 3 gain+0.0 dB
14Band 3 width1.00
15Band 3 moves byOff
16Band 3 threshold-30.0 dB
17Band 3 works onStereo
18Band 4 frequency8.00 kHz
19Band 4 gain+0.0 dB
20Band 4 width1.00
21Band 4 moves byOff
22Band 4 threshold-30.0 dB
23Band 4 works onStereo
24Output+0.0 dB

Presets: De-ess, Tame the boom, only when it booms, Harshness down when it's loud, Wider top, Bass in the middle, The centre forward as it's sung.

Fledge Heat

FledgeEffect.create(context, 'heat'). A saturator in three bands: lows, mids and highs each get their own kind of distortion (Soft, Warm, Hard, Fold, Bias, Tube, or left Clean), their own drive and their own level, so the bass can be warmed without the top crackling, or the top given grit without fuzzing the bass. A loud sound keeps its level as the drive goes up (more grit, not more volume); a quiet one comes up, as through any saturator: trim it with the band's level, which works on a Clean band too. Set where the bands meet with Low / mid and Mid / high; Mix blends it with the clean sound. No frames and no look-ahead, so it stays in time.

#ParameterStarts at
0Low / mid200 Hz
1Mid / high3.0 kHz
2Low styleClean
3Low drive12.0 dB
4Low level+0.0 dB
5Mid styleClean
6Mid drive12.0 dB
7Mid level+0.0 dB
8High styleClean
9High drive12.0 dB
10High level+0.0 dB
11Mix100 %
12Output+0.0 dB

Presets: Warm lows, clean top, Mid bite, Air and sparkle, Tape-like glue, Bass that speaks on small speakers, Torn apart.

Fledge Shape

FledgeEffect.create(context, 'shape'). A shape that repeats in time with the song, moving the volume, a low-pass or high-pass filter, or the pan. Pick the shape (Duck, Fall, Rise, Triangle, Gate, Trance gate, Stairs, Bounce) and how often it repeats, from four bars to a 32nd. A Duck on the volume every quarter note is a sidechain pump with no kick needed; a Fall on the low-pass every bar is a sweep; the Trance gate chops a pad into a rhythm; a Triangle on the pan swings it side to side. Depth is how far it goes, Smooth rounds its corners, and "Starts at" slides it along the beat. It follows the song's position, so it lands the same every time. No added delay. Follows the song's tempo and position.

#ParameterStarts at
0MovesVolume
1ShapeDuck
2Every1/4
3Depth70 %
4Smooth11 ms
5Starts at0 %

Presets: Pump on every beat, Pump on the off-beat, Trance gate, Chop in 16ths, Filter falls every bar, Filter opens over four bars, Thin, then full, every half bar, Side to side.

Build the .wasm files yourself

The effects are written in Rust, with no dependencies from anyone else. source/ is the whole workspace: each effect is its own crate (source/fledge-compressor and so on), built on source/fledge-dsp (filters, delay lines, an FFT), source/fledge-plugin (what a plugin is) and source/fledge-wasm (which makes one a WebAssembly module). In source/:

rustup target add wasm32-unknown-unknown
./build.sh                         # builds them all; in Fledgetone's repository, also puts them in public/fledgetone-plugins/
cargo test --release --workspace   # their tests

Outside Fledgetone's repository, take the files from source/target/wasm32-unknown-unknown/release/ (named with underscores: fledge_compressor.wasm). The modules have no imports and export the plain C functions listed in source/fledge-wasm/src/lib.rs, which fledge-effects-processor.js calls.

Licence

These files are free software under the MIT licence. The full text is in LICENSE. In plain words:

This is a summary to help you; the licence text in LICENSE is what counts. The Fledgetone studio itself is under a different licence, the GNU General Public License. Questions or concerns: email martin@twobirdsworkshop.com.