Closed SecondFlight closed 8 months ago
On 01/09/2015 12:14 AM, SecondFlight wrote:
Am I wrong about how it's supposed to work, or is this a flaw in the algorithm?
Flaw, just one of many in the DP design. Others including the linear scale of the wavegraph (but that requires compat-break to fix so must be done in 2.0).
This particular problem however is caused by the envelope-following code... I sort of know how to get it right, I just haven't had the time to fix it properly.
Ah, okay. I guess I won't use them in this project then. I'm trying to do multiband compression with dynamics processors, and they really mess up the sound. :3
It does seem to work alright for straight lines though.
This is something that could reasonably be solved with a (hopefully) small modification to the waveshaper plugin I'm working on. Once that plugin is done, I may be able to duplicate it and add attack and release to make a really nice compressor.
Or, like everything else in software engineering, it might be harder than it seems.
/shrug
I could be wrong about how the dynamics processor is supposed to work, but as I understand, it should work like a compressor with a custom curve. If you have experience with compressors, you probably know that a compressor will start doing strange things if the attack (or decay) is set to a value that is too short. If you have an attack that is too short, the compressor will change the shape of the wave because it is changing the volume so fast. Here's an example of a sine wave (roughly 50 hz) that has been run through C* Compress with the attack and decay set to 1.2 ms:
And here it is without:
Even with the low attack, there is still interpolation of some sort to keep the edges smooth.
The dynamics processor is doing something with roughly the same effect. Here are the settings I'm using to test this:
And here is the waveform it generates, along with the harmonics (each line represents a sine wave at that frequency - the original input was a single sine wave):
Am I wrong about how it's supposed to work, or is this a flaw in the algorithm?