How does a dynamic eq work?
-
- KVRian
- 1379 posts since 26 Apr, 2004 from UK
In the DAFX book for instance. Then it's practice on signal processing.
- KVRist
- 347 posts since 20 Apr, 2005 from Moscow, Russian Federation
As well as in http://scholar.google.com/scholar?q=rel ... as_sdt=1,5
-
- KVRian
- Topic Starter
- 1047 posts since 28 May, 2010 from Finland
So you think the Melda DynamicEQ could be allpass filters? But since an allpass filter does not (or can it?) create a shelf, then...?
-
- KVRian
- 1379 posts since 26 Apr, 2004 from UK
Yes it can. If you write it as a complex z transform expression, it's pretty obvious
-
- KVRAF
- 7383 posts since 17 Feb, 2005
The time constants, what are they? Bit confusing, I only see min limit of 0.Miles1981 wrote:For a peak follower, just do the abs value and then an attack/release filter after: https://github.com/mbrucher/AudioTK/blo ... er.cpp#L65
-
- KVRian
- 1379 posts since 26 Apr, 2004 from UK
The time constants are what you define for the attack and release values. Typically I use exp(-1/(t * fs)) (https://github.com/mbrucher/ATK-plugins ... r.cpp#L164 here the value is given in ms).
- KVRian
- 1091 posts since 8 Feb, 2012 from South - Africa
Sounds like a fun idea for a phaser!aciddose wrote: The structure I mentioned I worked on in 2003 overcame this, but in its place you have the issue that the total phase shift is variable while the frequency response is fixed. The result of that is you get a completely mangled phase response that warps chaotically as you change the parameters of different elements.
(sorry for the OT)
-
- KVRAF
- 7383 posts since 17 Feb, 2005
from the code:Miles1981 wrote:The time constants are what you define for the attack and release values. Typically I use exp(-1/(t * fs)) (https://github.com/mbrucher/ATK-plugins ... r.cpp#L164 here the value is given in ms).
set_release(std::exp(-1e3 / (GetParam(kAttack)->Value() * sampling_rate))); // in ms
So I graphed this, the domain which this would usually be used results in a very narrow result range. Just wondering if this is correct? Almost all normal settings would be a very small difference under 1. The value of 1ms results in a number like .99, slowly converging on 1 as time gets larger.
-
- KVRian
- 1379 posts since 26 Apr, 2004 from UK
Yes, exactly. The closer to 1 (so the more ms you want), the longer the time constant for the attack or the release. Same for an RMS computation.
The math behind is just the one on the first order filter (for instance http://gregstanleyandassociates.com/whi ... filter.htm or http://dsp.stackexchange.com/questions/ ... nd-impulse . I don't recall exactly where I got mine in the first place, it may have been a book and not an online reference).
The math behind is just the one on the first order filter (for instance http://gregstanleyandassociates.com/whi ... filter.htm or http://dsp.stackexchange.com/questions/ ... nd-impulse . I don't recall exactly where I got mine in the first place, it may have been a book and not an online reference).
-
- KVRAF
- 3080 posts since 17 Apr, 2005 from S.E. TN
Yah in many classic disciplines, it is an exponential curve going from current value to new value. If you give it a step input like 0 stepped to 1, or whatever--
The envelope would reach about 63% of target value in one time constant. In the case of stepping from 0 to 1, after 1 TC the value would be about 0.63.
Then in the second time constant, the envelope will narrow the remaining distance to the target by another 63%. For the step from 0 to 1, after 2 TC's the value would reach about 0.86.
On each additional TC the envelope narrows the remaining difference between the current state and the final target by 63%. In theory the envelope could never reach the target, almost like Achilles chasing the Tortoise!
In envelope followers it is usually chasing a moving target rather than a stationary target.
Even back in the 1970's I assumed that hardware compressors with time-marked envelope knobs were typically using that classic TC definition. Dunno nowadays if that is still true, or even if it was generally true long ago on old hardware.
There might be numerous equally reasonable ways to define exactly what an envelope attack time or release time ought to mean. Dunno.
The envelope would reach about 63% of target value in one time constant. In the case of stepping from 0 to 1, after 1 TC the value would be about 0.63.
Then in the second time constant, the envelope will narrow the remaining distance to the target by another 63%. For the step from 0 to 1, after 2 TC's the value would reach about 0.86.
On each additional TC the envelope narrows the remaining difference between the current state and the final target by 63%. In theory the envelope could never reach the target, almost like Achilles chasing the Tortoise!
In envelope followers it is usually chasing a moving target rather than a stationary target.
Even back in the 1970's I assumed that hardware compressors with time-marked envelope knobs were typically using that classic TC definition. Dunno nowadays if that is still true, or even if it was generally true long ago on old hardware.
There might be numerous equally reasonable ways to define exactly what an envelope attack time or release time ought to mean. Dunno.
-
- KVRAF
- 7383 posts since 17 Feb, 2005
Thanks for the explanation! I wasn't sure how it should be working. I though it was a naive peak follower but it was actually an average
jcjr, I suppose most simple envelope followers work with the 63 percent TC. To avoid confusion, I usually use the 99 percent point, with the simple follower that is the TC times 5.
jcjr, I suppose most simple envelope followers work with the 63 percent TC. To avoid confusion, I usually use the 99 percent point, with the simple follower that is the TC times 5.
-
- KVRAF
- 3080 posts since 17 Apr, 2005 from S.E. TN
Thanks camsr. Makes sense. The following are Captain Obvious ruminations. Just skip over it if too tedious. Thinking out loud, no particular point.
With the simple 63% TC curve, the attack curve is convex relative to Y axis but the decay curve is concave relative to Y axis. Captain Obvious, ya hear?
In the case of a full step from 1.0 all the way down to 0.0, it ought to decay about -8.6 dB per TC. Unless I'm getting something way wrong, that special case of decay to zero ought to plot linear, with time on the graph X axis and dB on the graph Y axis.
However, a step that does not go all the way down to zero would not seem to plot a straight line when plotted time vs dB. For example a step of 1.0 down to 0.707 ought to decay about -1.8 dB in the first TC, but each subsequent TC would have a smaller dB decay per TC. It doesn't seem that a release curve would plot a straight line for time vs dB except for that case of decay all the way down to zero?
That convex attack curve seems even less ideal if one would desire straight lines as plotted in dB. With a step from 0 to 1.0, it travels many dB within the first TC and very few dB in subsequent TC's.
Dunno if an envelope that follows straight lines in dB would offer any advantage for a compressor. If linear dB attack and release WOULD make a compressor work somehow better, then anyway simple 63% TC tracking isn't anywhere close to linear dB attack and release behavior.
I had ignored this aspect in the past. Blew it off, reasoning that compressors with simple 63% TC behavior have seemed to work pretty good, "as god intended" or whatever.
It would be fairly easy to make envelope follower that draws straight lines in dB.
One rule might be absolute dB per time. Given an attack time of 10 ms per dB, a 1 dB step would take 10 ms and a 10 dB step would take 100 ms. Maybe that would work ok or maybe it would behave too weird on music. Dunno.
Another rule might just connect the dots with straight lines, in dB. Given a 10 ms attack time, it would always take 10 ms to reach the new step, increasing linear dBs, regardless of step size. A step of 1 dB would rise at 0.1 dB per ms. A step of 10 dB would rise at 1 dB per ms. Maybe that could feel pretty natural or maybe not.
Perhaps there would be better rules than those two.
With the simple 63% TC curve, the attack curve is convex relative to Y axis but the decay curve is concave relative to Y axis. Captain Obvious, ya hear?
In the case of a full step from 1.0 all the way down to 0.0, it ought to decay about -8.6 dB per TC. Unless I'm getting something way wrong, that special case of decay to zero ought to plot linear, with time on the graph X axis and dB on the graph Y axis.
However, a step that does not go all the way down to zero would not seem to plot a straight line when plotted time vs dB. For example a step of 1.0 down to 0.707 ought to decay about -1.8 dB in the first TC, but each subsequent TC would have a smaller dB decay per TC. It doesn't seem that a release curve would plot a straight line for time vs dB except for that case of decay all the way down to zero?
That convex attack curve seems even less ideal if one would desire straight lines as plotted in dB. With a step from 0 to 1.0, it travels many dB within the first TC and very few dB in subsequent TC's.
Dunno if an envelope that follows straight lines in dB would offer any advantage for a compressor. If linear dB attack and release WOULD make a compressor work somehow better, then anyway simple 63% TC tracking isn't anywhere close to linear dB attack and release behavior.
I had ignored this aspect in the past. Blew it off, reasoning that compressors with simple 63% TC behavior have seemed to work pretty good, "as god intended" or whatever.
It would be fairly easy to make envelope follower that draws straight lines in dB.
One rule might be absolute dB per time. Given an attack time of 10 ms per dB, a 1 dB step would take 10 ms and a 10 dB step would take 100 ms. Maybe that would work ok or maybe it would behave too weird on music. Dunno.
Another rule might just connect the dots with straight lines, in dB. Given a 10 ms attack time, it would always take 10 ms to reach the new step, increasing linear dBs, regardless of step size. A step of 1 dB would rise at 0.1 dB per ms. A step of 10 dB would rise at 1 dB per ms. Maybe that could feel pretty natural or maybe not.
Perhaps there would be better rules than those two.
-
- KVRian
- 1379 posts since 26 Apr, 2004 from UK
This envelope follower is an exponential one, so at each step, it does += TC * (target - original) (it's the behavior of a simple RC cell actually). So the fact that by going to 0 you have a constant number of dB is derived from the formula, you have the -TC applied directly to the original value, so it's the same number of dB each time (as dB is referenced to the original signal). In the case of going to another value, you don't have the same simplification, and then the number of dB changes.
I don't think a "linear" dB attack or release would work better. It would not be able to follow the envelope as what we do currently, and would sound not natural, as this RC cell thingy is more or less what drives everything that's amortized in this universe (there should be an L to be really closer to reality). So this envelope follower is IMHO the best envelope follower that can be done, and it is linear because the PDE is linear.
I don't think a "linear" dB attack or release would work better. It would not be able to follow the envelope as what we do currently, and would sound not natural, as this RC cell thingy is more or less what drives everything that's amortized in this universe (there should be an L to be really closer to reality). So this envelope follower is IMHO the best envelope follower that can be done, and it is linear because the PDE is linear.
-
- KVRAF
- 7383 posts since 17 Feb, 2005
A linear envelope would move faster (in dB) the closer it was to zero and over time. I find this to sound better at lower levels of gain manipulation. A linear dB movement is what the RC curve provides, but only on the attack portion as jcjr noted. An exponential (square) curve is what moves the dB scale as one would expect, like a fader. A linear envelope could be put through a square function to make it linear dB, and it works over the entire range with a 2^x correction.