audioJS

@audio/dynamics-envelope

Status pending calibration

npm0.1.4licenseMIT

Branching one-pole envelope follower. Returns a stateful per-sample detector

Overview

Install
Updated
Family
dynamics, 17 packages under it
Tags
shape
import { envelope } from '@audio/dynamics-envelope'

The common detector for the envelope-driven processors is a branching one-pole follower with separate attack/release time constants, peak or RMS detection.

import { envelope } from '@audio/dynamics-envelope'

let follow = envelope({ attack: 5, release: 100, detector: 'peak' })
let level = []
for (let x of samples) level.push(follow(x))
Param Default
sampleRate 44100 —
attack 5 ms
release 50 ms
detector 'peak' 'peak' or 'rms'
rmsWindow 256 samples, for RMS detector

Part of @audio/dynamics — the dynamics family umbrella. This README is generated from the umbrella docs.

MIT © audiojs