hey ive always wanted to sidechain my other channels to a kick. Is there a livecode solution to this i cannae figure it out :<<
lots of love,
Kim
ritchse
September 23, 2022, 7:51pm
2
this is something i've tried many times for more than a year already. i'm still trying to find the best solution. here are some links from all different attempts:
This may be redundant but I couldn't figure out if this is built into a compression effect, its own effect, or not implemented yet.
Anyone know how to sidechain compress in Tidal?
I'm trying to make a compressor for SuperDirt, specifically because I want to achieve " Sidechain Compression in Tidal? ". I've been running into many problems and my main concern right now is default values.
Setup
I added the global effect to the orbits globalEffects array:
~dirt.orbits.do { |x|
var l = x.globalEffects.size;
x.globalEffects = x.globalEffects.insert(l-2,
GlobalDirtEffect(\dirt_compressor,['comp','thresh','atktime','reltime','upcomp','makeup','sidechain']));
x.initNodeTre…
opened 09:14PM - 12 Aug 21 UTC
This is a repost from: https://club.tidalcycles.org/t/innard-help-problems-with-… globaldirteffects-while-coding-a-compressor/3397
System:
Win8.1, SC 3.12.0, SD 1.7.2, Tidal 1.7.8
---
I'm trying to make a compressor for SuperDirt, specifically because I want to achieve " https://club.tidalcycles.org/t/sidechain-compression-in-tidal/509?u=ritchse ". I've been running into many problems and my main concern right now is default values.
**Setup**
I added the global effect to the orbits globalEffects array:
```supercollider
~dirt.orbits.do { |x|
var l = x.globalEffects.size;
x.globalEffects = x.globalEffects.insert(l-2,
GlobalDirtEffect(\dirt_compressor,['comp','thresh','atktime','reltime','upcomp','makeup','sidechain']));
x.initNodeTree;
};
```
I defined some default values to the arguments of the SynthDef as one usually does:
```supercollider
~dryBuses = [];
~dirt.orbits.do { |x|
~dryBuses = ~dryBuses ++ x.dryBus
}
(
SynthDef.new("dirt_compressor" ++ ~dirt.numChannels,
{|dryBus, effectBus, comp=1, thresh=0.5, atktime=0.01, reltime=0.1, upcomp=1, makeup=1, sidechain=(-1)|
var sound, in, control, chs;
chs = ~dirt.numChannels;
in = In.ar(dryBus, chs);
control = In.ar(Select.kr(sidechain+1,[in]++~dryBuses),2);
sound = Compander.ar(in, control, thresh: thresh, slopeAbove: (1/comp),
clampTime: atktime, relaxTime: reltime, mul: makeup, slopeBelow: (1/upcomp));
Out.ar(effectBus, sound)
}, [\ir, \ir]).add;
s.freeAll;
)
```
And set my params in tidal as such:
```haskell
let comp = pF "comp" -- compression ratio
thresh = pF "thresh" -- threshold
atktime = pF "atktime" -- attack time
reltime = pF "reltime" -- release time
upcomp = pF "upcomp" --upwards compression ratio
makeup = pF "makeup" --amplitude of the output
sidechain = pI "sidechain" --orbit from which to sidechain
```
**Results**
```haskell
d1 $ s "bd*2" # makeup 1 # comp 1 # thresh 1
```
^ This is a neutral state of compression, nothing is happening, and sound is coming out as expected: the same as with no effects.
```haskell
d1 $ s "bd*2" # makeup 0 # comp 1 # thresh 1
```
^ This should produce no sound, yet it does, at a lower volume than before. I'd say about half the volume; so, is it running on parallel?
```haskell
d1 $ s "bd*2"
```
^ This should sound the same as in the beginning, but it sounds the same as the previous example.
I figured it must have to do with default values or something so I checked the node tree:
```supercollider
8768 dirt_compressor2
dryBus: 48 effectBus: 50 comp: 0 thresh: 0 atktime: 0.0099999997764826 reltime: 0.10000000149012 upcomp: 1 makeup: 0 sidechain: -1
8767 dirt_rms2
```
Here I run into my first problem: **When erasing a paramater, it doesn't go back into its default value**.
I'm guessing SC just ignores the last change of values into `0` since it would generate a division by zero error, hence the same output as before.
```haskell
d1 $ s "bbtdr*2" # makeup 1 # comp 1 # thresh 1
```
^ This one is mind-boggling to me. After that mess of division by zero, when I try to go back into the neutral state of compression, now I hear nothing! There's no output.
Here's the whole node tree of the first orbit:
```supercollider
2 group
9347 group
-101992 dirt_sample_2_2
out: 46 bufnum: 44 sustain: 0.41246938705444 begin: 0 end: 1 speed: 1 endSpeed: 1 freq: 261.62557983398 pan: 0 span: 1
-102000 dirt_gate2
out: 48 in: 46 sustain: 0.41246938705444 fadeInTime: 0 fadeTime: 0.0010000000474975 gain: 1 overgain: 0 amp: 0.40000000596046 sample: 1436622976 gateSample: 0 cutAll: 0
8771 dirt_delay2
dryBus: 48 effectBus: 50 gate: 1 delaytime: 0 delayfeedback: 0 delaySend: 1 delayAmp: 0 lock: 0 cps: 0.5625 resumed: 0
8770 dirt_reverb2
dryBus: 48 effectBus: 50 gate: 1 room: 0 size: 0.10000000149012 dry: 0 resumed: 0
8769 dirt_leslie2
dryBus: 48 effectBus: 50 gate: 1 leslie: 0.5 lrate: 6.6999998092651 lsize: 0.30000001192093 resumed: 0
8768 dirt_compressor2
dryBus: 48 effectBus: 50 comp: 1 thresh: 1 atktime: 0.0099999997764826 reltime: 0.10000000149012 upcomp: 1 makeup: 1 sidechain: -1
8767 dirt_rms2
dryBus: 48 effectBus: 50 gate: 1 rmsReplyRate: 0 rmsPeakLag: 0 orbitIndex: 0 resumed: 0
8766 dirt_monitor2
dryBus: 48 effectBus: 50 outBus: 0 gate: 1 limitertype: 1 resumed: 0
```
I realized that every global effect except the one I'm trying to add has the argument `resmued` at the end. I tried looking for it in the SuperDirt repo but couldn't really figure out what it is exactly.
**Final questions**
* What is the 'resumed' argument in all GlobalDirtEffect's?
* How do I make it so parameters go back into their default value state when erasing them from Tidal code?
* Why does setting the 'makeup' to 0 still produce a fair amount of sound?
*Thank you for reading all this mess ! Love*
opened 02:08AM - 16 May 22 UTC
I realize some synthdefs (like the reverb one) automatically go back to their de… fault values when they stop being referenced in tidal code. For example setting the `size` of the reverb to 0.5, then removing that from the code and have it go back to 0.1.
Where is this set? With regular SC synthdefs setting arguments to `nil` just sets them to `0`.
I could try to finish my last attempt which seemed to be getting somewhere
1 Like
While of course I would love sidechaining in tidal, I simulate a side chain by ducking the track with a gain pattern similar to the kick.
For example, if your kick is 4 on the floor d1 $ n "{0 ~~~}%16" # s "drums"
and you want to side chain track d2 $ s "hats * 16"
just lower the volume on the hit: d2 $ s "hat*16" # amp "{0.2 0.5 0.5 0.5}%16"
.
I've also been banging my head figuring an elegant way to duck a track using another pattern.
while of course I would love sidechaining in tidal, I simulate a side chain by ducking the track with a gain pattern similar to the kick.
This is a great trick, which unfortunately requires patterns to have pauses and a matching number of steps. I'm using this at the moment, but would really love a more flexible way without these limitations -- though I guess it'd only be effectively doable by detecting the source track's amplitude, which goes way beyond what can be done in Tidal (i think)
In any case, StageMaster seems to be a good addition to compress and EQ outputs, I wonder if anyone's used it + if it can be tuned to apply different parameters to each orbit?
2 Likes
yaxu
May 11, 2023, 12:14pm
5
Does this approach not work?
/*
how to route Dirt audio into post-processing in SuperCollider
This assumes that you have SuperDirt running and accesible in ~dirt
*/
// define a bus you'll be using for routing
~bus = Bus.audio(s, numChannels:2); // assuming stereo, expand if needed
~dirt.orbits[0].outBus = ~bus; // play into that bus.
/*
Now, playing patterns in d1 in tidal should be silent.
This file has been truncated. show original
I did try StageMaster at a recent gig, and to my ears, it made everything sound better.
1 Like
Jalex
May 12, 2023, 10:13am
6
how about implementing it as a mixing option ? as practice has shown, this is very practical and quite imperceptible. Here is a link for an example of a ready-made plugin.
https://github.com/ryukau/VSTPlugins/releases/download/UhhyouPlugins0.55.0/RingModSpacer_0.1.2_macOS.zip
https://github.com/ryukau/VSTPlugins/releases/download/UhhyouPlugins0.55.0/RingModSpacer_0.1.2.zip
don't forget to do side mix in zero.
thnx!
Jalex
May 12, 2023, 10:43am
7
2 signal examples with and without this method
Use ampbus
instead, then it will apply to any length audio sample - check out the control busses doco
1 Like
i had completely forgotten about busses, this seems just right. I'll get to work <3
1 Like