Dynamics Compressor (Scriptnode Question)
-
-
@Steve-Mohican I'll try to check this out today
-
@Steve-Mohican The max gain reduction should be the threshold I imagine. I can’t think of a way to make it efficient at the moment but I think the upcoming pma.node will help to handle such a scenario... Perhaps fiddling around with some add/sub/mul nodes can help but I’m not in front of my computer to test...
What if you just add a sub.node after or before the add.node, link it to the threshold and play with the sub min/max/skew? -
@dustbro said in Dynamics Compressor (Scriptnode Question):
@Steve-Mohican I'll try to check this out today
this would be great. I think this issue concerns all the developers who want to make side-chain filtered compressors.
@ustk said in Dynamics Compressor (Scriptnode Question):
@Steve-Mohican The max gain reduction should be the threshold I imagine. I can’t think of a way to make it efficient at the moment but I think the upcoming pma.node will help to handle such a scenario... Perhaps fiddling around with some add/sub/mul nodes can help but I’m not in front of my computer to test...
What if you just add a sub.node after or before the add.node, link it to the threshold and play with the sub min/max/skew?I tried multiplying, it doesn't work effectively and the compression curve doesn't looks normal too. But I will try sub node.
-
Has anyone found a solution?
-
I tried sub node but no luck unfortunately.... or at least I couldn't figured it out to use that node properly
-
I'm not sure what you are trying to achieve here. The weird curve might come from the fact that the scale of the gain knob is logarithmically, but I don't understand the intention of this patch.
Also the entire mod_chain node is unnecessary, just drag the compressor directly to the gain.
-
@Christoph-Hart said in Dynamics Compressor (Scriptnode Question):
I'm not sure what you are trying to achieve here. The weird curve might come from the fact that the scale of the gain knob is logarithmically, but I don't understand the intention of this patch.
Also the entire mod_chain node is unnecessary, just drag the compressor directly to the gain.
Ok.
Sidechain compression scheme is below. There is an analysis compressor that has a high pass filter before it. The purpose it to make compressor behave to high frequencies, we don't want the compressor to jump for bass frequencies. So we take the gain reduction information of this pre filtered compressor to modulate a gain unit (or compressor - I don't know if "compressor to compressor modulation" is possible). It is not a multiband compressor by the way, this is completely diffrent and it has been used tons of hardware units.
So because of that I used gain. But if it is possible, compressor to compressor would be much more awesome.
-
Ah ok, in that casey you might want to increase the HP frequency (in your patch it's 20Hz which doesn't do anything noticeable).
Then there are other things to watch out:
- 16x oversampling is way way way overkill for this algorithm. Just because it's there it doesn't mean you should use it. You're not introducing much harmonics with this DSP algorithm.
- More importantly is the same advice I gave in the other thread: you need to split down the signal into smaller chunks to increase the update rate (and in this case you might even need to use the frame processing block because you want the compressor to be snappy). This will have a real impact on the sound - unlike the 16x oversampling which will just increase the CPU usage by 16. Right now your calling the gain factor update every 512 samples (or whatever your buffer size is). Considering the 16x oversampling, you even update the gain every 8192 samples!
- Again, connect the compressor directly to the gain, the indirection through the mod chain is unnecessary.
- Don't use the gain node here. You don't need the smoothing and you don't need the decibel conversion, which are the exact two things that make it different from the plain
math.mul
node, so please use that one instead as target node for the compressor's side chain signal. Also thegain2
node at the end of your analysis chain should be amath.clear
node - all it needs to do is to clear the signal. - Now to your original problem: you will need to change the range of the modulation to be inverted (and there's no need for a
core.pma
module here). Just right click on the compressor and swap the minimum and maximum values at the modulation connection properties. The modulation signal from the compressor module is the ducking amount, so you want this to be subtracted from a fixed value. - If you're end up with a frame-processing, it's highly recommended to compile this node network to a C++ node, otherwise the performance will not be comparable to other effects with similar processing. The export is broken in the current version but the good news is that this patch should be 100% compatible with the new version.
-
@Christoph-Hart Thank you so much, I really appreciate that advise, I'll try these instructions
the good news is that this patch should be 100% compatible with the new version.
Looking forward to see it :)