Compression sidechaining (Compander?)

hello, is there a way to sidechain a kick to a sound ? I have a non stopping signal I would like to compress with my kick to create a rhythm.

I looked at the Sidechain gentle notch effect and it seems a little tricky to set an envelope for each hit, is there another way ? I have been trying using compander with the control param but bus ar and pbind signals wont work…

thanks community

Maybe have a look at this:

https://sccode.org/1-55m

= O thanks a lot ! :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart:

this might be a little deeper but i have this tempoclock that I usually time my events with as t = TempoClock.new(151.703592/60).permanent_(true); and then .play(t) but it wont work with the code provided in last post. is there another way around to change the tempo of the kick please ?

Here’s a simpler example that I built from the one I linked to. You’d need to replace \morphbass and \bf with synths that you have:

~dbus = Bus.audio(s,2);
~cbus = Bus.audio(s,2);
Pbindef(\a, \i, \bf, \a, 0.2, \out, [0, ~cbus]);
Pdef(\b, Pmono(\morphbass, \o, [2,3,4], \out, ~dbus));
)

Pbindef.all.do(_.play)

Ndef(\duck, {Compander.ar(In.ar(~dbus,2), In.ar(~cbus,2) * 2, thresh: 0.01, slopeBelow: 1, slopeAbove: 1/4, clampTime: 0.001, relaxTime: 0.04)}).play

I don’t see why that wouldn’t work with an explicit tempo.

thank you so much I will try tomorrow and hopefully confirm the miracle ^^

hey this is perfectly working, a bit tired i kept omitting/ In.ar(~dbus,2) /and wrote the variable without the syntax.