@ondas/dattorro-reverb
v0.3.0
Published
Datorro algorithmic reverb
Downloads
9
Readme
DattorroReverb
Algorithmic reverb
Dattorro algorithmic reverb implemented as an AudioWorklet.
The actual dsp code is taken from https://github.com/khoin/DattorroReverbNode slightly adapted.
import { DattorroReverb } from "@ondas/dattorro-reverb";
const audioContext = new AudioContext();
const reverb = new DattorroReverb(audioContext);
reverb.getParam("decay").setValue(0.2);
const piano = new TinyPiano(audioContext).bus1(reverb, 0.2);
Install
npm i @ondas/dattorro-reverb
Usage
All reverb parameters are accessed using getParam
method. It returns an AudioParam
, so they
can be scheduled with the Web Audio API:
reverb.getParam("decay").setValue(0.2);
reverb.getParam("wet").linearRampToValueAtTime(context.currentTime + 1.0, 0.5);
The full list of params are exposed as paramNames
:
reverb.paramNames; // =>
// [
// "preDelay", "bandwidth", "inputDiffusion1", "inputDiffusion2",
// "decay", "decayDiffusion1", "decayDiffusion2",
// "damping", "excursionRate", "excursionDepth",
// "wet", "dry",
// ];