Custom Audio effect plugin

I’m trying to create an audio plugin that supports a sidechain input. The flow that I’m working out:

  • Use an envelope follower against the sidechain
  • Convert this value to a detected dB and compare to a low and high threshold
  • If the detected dB is less than the low threshold apply volume ducking
  • If the detected dB is higher than the high threshold apply the inverse of volume ducking (or a form of amplification)
  • If the detected dB is in between the 2 thresholds the input audio will have no effect applied

The envelope follower and converting the output value into dB has been accomplished but I’m stuck on the volume ducking portion.

I think this is mostly resolved. The issue I was running into was that I was dealing with 2 sets of functions that would be better serviced by having the same amount of parameters to match.

Hi, can I ask you how you set up the envelope follower? I’m having a hard time making things work