audio

@audio/spatial-widener1.2.0

Stereo widener

Stereo widener — mid/side processing to adjust stereo width

Status
calibrated
Updated
Family
spatial, 12 packages under it
Plugin
widener, effect, streaming, 1 parameter
Category
effects
Licence
MIT
Dependencies
none
Downloads
2,201 last month
Tests
66 in audiojs/spatial's CI, passed at 656b55c,

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').widener()

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

Parameters

  • effect
  • streaming
width
1.5
0 to 4
import stereoWidener from '@audio/spatial-widener'

Mid/side widener: splits left/right into mid/side, scales side by width, recombines. width=0 collapses to mono, width=1 is passthrough, width>1 emphasizes the side (stereo) content. Modifies left/right in place.

stereoWidener(left, right, { width: 1.5 })   // both modified in place
Param Default
width 1.5 0 (mono) .. 1 (original) .. 2 (full side emphasis)

widen(left, right, width, moving) does the same in place and returns nothing: a host's block, allocating nothing. The width is an array, width[i] for sample i while moving is 1, width[0] throughout when it is 0; the audio.js manifest glides a host's ramp of width sample by sample into it.

Use when: simple, cheap width control; spatial-midside is the matrix underneath if you need mid/side access directly.


Part of @audio/spatial — the spatial family umbrella.

MIT © audiojs