weirdnet-audio-plugin
Audio plugins for Weirdnet by Weird Brains: a plugin takes a Waveform from weirdnet-media and typed parameters, and returns a new waveform. Plugins are pure, so a result can be cached under a key that means what it says.
Plugin,ParamSpec,ParamValues: a plugin declares its parameters (float with a range and unit, bool, or a choice, each with a default).ParamValues::resolvefills defaults and rejects unknown names, wrong kinds and out-of-range values, soprocessonly sees complete, valid values.Registry: plugins by id.Registry::with_builtins()has the three built-ins; appsregistertheir own.apply_chainrunsPluginInstances in order (a step can be bypassed); the error says which step failed.chain_cache_keyis a BLAKE3 key over the source (waveform_hash), each active step's plugin id andversion, and its resolved parameters. Spelled-out defaults and bypassed steps do not change it; the order, any parameter and a plugin version do. Its value for a fixed input is pinned by a test, so a key saved in a project stays valid.- Built-ins, each an identity at its defaults:
weirdnet.gain(gain_db,invert),weirdnet.levels(peak or RMS normalise, a peak ceiling, constant-power pan)weirdnet.frequencies(low, high, band-pass or peaking filter from weirdnet-dsp),weirdnet.pitch(semitones and cents; keeps the length with the stretch library, or resamples) andweirdnet.duration(change the length only:stretchkeeps the pitch,trimcuts with a fade; stretch is the crate featurestretch, on by default, and needs clang and libclang to build).
[]
= "0.1"
= "0.2"
use ;
use Waveform;
let registry = with_builtins;
let input = tone?;
let chain = ;
let output = apply_chain?;
let cache_key = chain_cache_key?;
The apply_chain example runs a chain over a WAV file: cargo run --example apply_chain -- --demo out.wav gain:gain_db=-6 frequencies:type=low,cutoff_hz=800 levels:target=peak,target_db=-1.
Hosting third-party plugin formats is out of scope.
Rust 1.99 or newer, edition 2024. BSD-3-Clause, Copyright (c) 2026, Weird Brains LLC.