Stereo widener — mid/side processing to adjust stereo width
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
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