Code:
desc:Transient Slope Converter (by zappazapper)
@init
previousL = 2;
previousR = 2; // since spl0 and spl1 go from -1 to 1, a value of 2 will mean it's the first sample
@sample
currentL = spl0;
currentR = spl1;
previousL != 2 ?
(
slopeL = abs(previousL-currentL) / srate;
slopeR = abs(previousR-currentR) / srate;
);
previousL = currentL;
previousR = currentR;
spl0 = slopeL;
spl1 = slopeR;
I have been using transient processing more and more, and really like the idea of multiband transient processors but none of the ones I've tried offer the capability that multiband dynamics processors do. The one I'm most used to is Waves TransX Multi, which only offers global attack and release times. It occurred to me that a dynamics processor and a transient processor are essentially doing the same thing (adjusting gain), but based on different information (peak or rms LEVEL vs change in level over time, or POWER, i guess?).
So I made this little plugin to convert a signal into a value that roughly represents that change in signal level over time (no calculus going on here, it just divides the difference between the previous and current sample level by the sample rate). The result can be used to key a sidechain multiband dynamics processor like Waves C6, essentially turning it into a more flexible multiband transient processor.
Please note that I am not much of a programmer. This is just a concept and I'm sure there are better ways of doing this and better programmers to do it. The resulting signal is very low so I use a JSFX volume plugin to add 96db of gain to get it up around full scale so it can be useful. Any real implementation of such a concept would have to include that gain.
At first glance, this seems to do the job it was intended for. I put a drum loop, which sounded already quite compressed, into C6, using this plugin to key the external sidechain. In terms of the basic task of pulling out the attack of the kick, snare and hihat, using this plugin in the external sidechain was considerably more effective than using the unaffected (internal) signal as the key.
I would love comments on the basic concept and/or the plugin itself.