audio

@audio/effect-sbr1.3.0

Spectral band replication

Spectral band replication — extend HF from midband harmonics (aural exciter family; De-Slop bandwidth recovery)

Status
calibrated
Updated
Family
effect, 26 packages under it
Plugin
sbr, effect, streaming, 3 parameters
Category
effects
Licence
MIT
Dependencies
none
Downloads
2,252 last month
Tests
138 in audiojs/effect's CI, passed at 5ff5a84,

Listen

// "Local Forecast" by Kevin MacLeod (incompetech.com), CC BY 4.0, incompetech.com/music/royalty-free/faq.html
audio('/samples/music/modern/local-forecast.mp3').sbr()

// "Local Forecast" by Kevin MacLeod (incompetech.com), CC BY 4.0, incompetech.com/music/royalty-free/faq.html

Parameters

  • effect
  • streaming
  • tail
fc
8000 Hz
2000 to 16000 Hz
amount
0.5
0 to 1
drive
0.5
0 to 1

Exciter-class bandwidth recovery: takes the top octave still present below fc, regenerates its harmonic series with a waveshaper (harmonics land above fc), highpasses at fc, and mixes back in at a level tracking the source band's envelope. Recovers HF lost to lossy encoding or a lowpassed source.

Install

Usage

import sbr from '@audio/effect-sbr'

let p = { fc: 8000, amount: 0.5, drive: 0.5, fs: 44100 }
for (let buf of stream) sbr(buf, p)

sbr(data, params) mutates data (Float32Array/Float64Array) in place and returns it. Pass the same params object across calls — the source bandpass, output highpass, and envelope-follower state persist on it (_src, _hp1, _hp2, _env, _henv, _dc).

fc where the source content dies, Hz (default 8000; cutoff still accepted) · amount replication level 0–1 (default 0.5) · drive waveshaper intensity 0–1 (default 0.5) · fs sample rate

Use when: restoring HF on lossy-encoded or bandwidth-limited material, mastering "air"
Not for: adding harmonics to a full-bandwidth source (use @audio/effect-exciter) or bass reconstruction (use @audio/effect-subbass)

Part of @audio/effect.