Sidechain gentle notch effect

I have two SynthDef sounds, one with a 2 second (1 bar) envelope and another that is constant and the frequency gets changed.

I would like to introduce sidechain and temporarily reduce the ‘amp’ amplitude of these sounds on the beat. The perfect solution is a notch (in time) that reduces the amplitude from 1 to 0 on an inverse exponent and then rises from 0 to 1 on an inverse exponent. I.e the fall starts the muting slow and then speeds up and once it hits 0 (on or around the beat) then quickly rises again and slows down as it reaches 1.

The problem is, perhaps, that my inability to know the name, phrase or provide a better explanation for this “amplitude vs time” notch is limiting my search for the perfect function that may already exist.

Please note that I already have the device that produces the sounds and the beat signal, so it is not a simple matter of creating a pbind or a pattern that has a repeating amplitude-shaping function. I can of course drop the amplitude to zero and then back to 1, but that does not sound natural and therefore I am looking for this smooth curved envelope that can temporarily mute the sound down then back up to its correct level naturally.

Many thanks in advance.

The three UGens you should take a look at: Amplitude, RMS and PeakFollower. Using these, in combination with methods like linexp, explin, or lincurve to re-scale your amplitude measurements to generate the amplitude you want to apply to your signal.

Note that Compander also provides similar functionality out-of-the-box, but it provides less freedom to have fine-grained control over the scaling.

1 Like

Thank you for your suggestion, but these only tell me what amplitude to return to after the notch, which may eventually be helpful, but, as yet, I have not worked out how to apply a V-shaped notch (with curved sides - like a tornado) to reduce the amplitude for the sidechain.

I think I know when to apply the notch, which will be a formula based on the bpm to calculate the time after the previous beat or step, since it needs to start reducing the amplitude before the beat.

All I need now is an amplitude-v-time notch ugen. Is there one?

EnvGen? Each segment can specify an arbitrary curvature: a positive curve value “pulls” the line toward the right, while a negative curve pulls it to the left.

There’s no need for a specific UGen for this. You can generate a notch shape using EnvGen, and you can apply the shape to amplitude using *.


Awesome!! The quality of the replies here is simply outstanding. Thank you.

  1. I created the following Envelope in the SynthDef which produces my notch 0.125s after being triggered.[1, 1, 1, 0, 1], [0,0,0.125, 0.125],[10, -20]).plot

  2. I added a sidechain argument to my SynthDef and used it to trigger the envelope.

    snd = snd *[1, 1, 1, 0, 1], [0,0,0.125, 0.125],[10, -20]),sidechain,doneAction:0);

  3. I send the trigger via OSC on the previous 8th note step (0.125s before the beat that I want to sidechain)

    s.sendMsg("/n_set", node, “sidechain”, 1);

I may have to fiddle with the timings, but I thought I would update the question sooner rather than forgetting later.