I'm trying to create a dynamic processor in PD with attack and release times. I'm assuming the easiest method is to use two line functions to glide between the pre and post compressor levels depending on the attack and release time.
My question is: how do i go about creating a line function that takes the gain to the final value after the input goes above the threshold, and then how to make it go back to the input level once it drops back below the threshold.
I would attach my entire patch at the moment but it's a little messy and confusing at the moment and still a work in progress, I've instead just attached a little extraction of it - I hope it make sense!
Any help with this would be greatly appreciated!