@ondas/dattorro-reverb
TypeScript icon, indicating that this package has built-in type declarations

0.3.0 • Public • Published

DattorroReverb

Algorithmic reverb

npm version npm version

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",
// ];

Package Sidebar

Install

npm i @ondas/dattorro-reverb

Weekly Downloads

0

Version

0.3.0

License

MIT

Unpacked Size

30.1 kB

Total Files

7

Last publish

Collaborators

  • danigb