-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Release Simple Stereo Width Control v1.0 (#395)
- Loading branch information
1 parent
b7b315d
commit d13a1b0
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
desc: Simple Stereo Width Control | ||
author: Denis Filippov | ||
version: 1.0 | ||
about: | ||
# Simple Stereo Width Control | ||
|
||
Controls the width parameter with one slider. | ||
|
||
Features: | ||
- Lightweight and simple width controller. | ||
- Does not affect signal when set to 1. | ||
|
||
Usage: | ||
- Add to item or track, move the slider to change width. | ||
|
||
|
||
desc:Simple Stereo Width Control | ||
|
||
slider1:1<0,1,0.01:sqr>Width | ||
|
||
@init | ||
width = slider1; | ||
|
||
@slider | ||
width = slider1; | ||
|
||
@sample | ||
tmp = 1 / max(1 + width, 2); | ||
coef_M = 1 * tmp; | ||
coef_S = width * tmp; | ||
|
||
m = (spl0 + spl1) * coef_M; // mid signal (spl0 = left, spl1 = right) | ||
s = (spl1 - spl0) * coef_S; // side signal | ||
|
||
spl0 = m - s; // out left | ||
spl1 = m + s; // out right |