the compressor from Dirt, implemented as a SuperCollider plugin.
build:
mkdir build
cd build
cmake .. -DSC_PATH=/path/to/supercollider-source
make
then copy DirtCompressor.sc
and DirtCompressorEnv.scx
into your SuperCollider extensions folder. (on some operating systems, it might be just DirtCompressorEnv
without the extension?)
TODO: CI, precompiled builds
for SuperDirt, etc:
(
Ndef(\dirtComp, { |amount=1, speed=50|
var in, max, env;
in = In.ar(0, ~dirt.numChannels);
ReplaceOut.ar(0, amount.linlin(0, 1, in, DirtCompressor.ar(in, speed)));
}).play(
group: RootNode(Server.default),
addAction: \addToTail
);
)
// can also tune the parameters
Ndef(\dirtComp).set(\amount, 1);
Ndef(\dirtComp).set(\speed, 200);
the original Dirt compressor's output can depend on the order of the input channels, which is probably a bug. by default, DirtCompressor
"fixes" this, but if you want the original behavior, pass bugCompatible: true
.