AudioTK library

DSP, Plugin and Host development discussion.
Post Reply New Topic
RELATED
PRODUCTS

Post

Fluky wrote:Oops.

But, I'm converting the numbers using
exp( -1 / t * 1e-3 * samplerate), where t is the time value in seconds.

So is the [0,1] in seconds or what? Or I can use the above conversion so that dt is time in seconds?

The envelope produces some expansion since I'm applying it to a parameter that does not produce overgain in its value range. Still adding the envelope by multiplying the parameter with it leads to overflowing values, i.e. expansion, at some attack/release values. This must mean that the produced envelope does contain negative values (since the parameter I'm multiplying is all negatives, so it can't produce positive unless there's two negatives multiplied).
No, [0, 1] is because you do a pondered mean between the last envelope value and the new value (see the code).
The envelope should never produce expansion, as it is a geometric mean/suit between former values.

Post

Fluky wrote:
Miles1981 wrote:Attack and release must be between 0 and 1. To convert a time to such a number, it's as I've said in other posts, use exp(1/(dt * sampling_rate)).
I forgot to add an exception to forbid values higher than 1.

The envelope is never be negative. An envelope is in R+, not R. As I've said as well, you should use a filter before to compute the type of norm you want. I always use PoweFilter because I want RMS like envelope, but you can use abs if you wanted. It's as easy to write as the InvertFilter.
Why does it lead to that using that exp-equation above it leads to constantly increasing values, to infinity. I.e. converting attack 1.0 and release 1.0 and what i see is a value that's increasing and increasing and increasing... like it never stops.
Please see the discussion on the attack/values parameters in the other topics, I don't want to write down several times the same explanation in a week.
It never stops increasing because you are using values greater than 1. Please look at the AR filter equation and the code, it's a geometric suit, so if the lambda is greater than one, it diverges. It's just plain simple math.

Post

It does produce negative values. I'm reading input directly from the produced envelope and setting attack 10.0 release 25.0 for example produces negative values around [-0.10,-0.25]

It produces negative values in the full audio range if I set release 10.0 and attack anything in [10.0, 100.0].

I'm passing values as std::exp(-1e3 / GetParam(kAttack)->Value() * samplerate) (same as here: https://github.com/mbrucher/ATK-plugins ... or.cpp#L91)
where GetParam(kAttack)->Value() is in [10.0, 100.0].

Note that in the plug-in framework I'm using the audio range is [-1.0, 1.0].

Post

If you are driving values from [-1, 1] inside the filter, it will output values in the same range. Just check the equation ! As I've said, you need to first filter the way you want to take the envelope (L1 norm with abs, L2 norm with RMS and PowerFilter...).
Also please not that the equation you are using is not the one I'm actually using.

Post

Miles1981 wrote:If you are driving values from [-1, 1] inside the filter, it will output values in the same range. Just check the equation ! As I've said, you need to first filter the way you want to take the envelope (L1 norm with abs, L2 norm with RMS and PowerFilter...).
Also please not that the equation you are using is not the one I'm actually using.
So which of these ways is recommended?
L1, L2?

I'm looking for a response similar to in a compressor.

Post

I think L2 is better than L1, but then in a compressor, it's almost identical to L1, as there is just a factor in the exponent when dealing with different kind of power.

Post

Hey Matt,

Have you come across problem with the AudioTK AttackReleaseFilter in which the filter appears as if it would create sudden loud bursts, which in Reaper cause the track to be muted. I believe the muting happens only because of loud (short) noise generated and I tested that it's replicated by outputting only from the AttackRelease processing chain (I'm using it in a compressor like setting).

Any ideas what I could to to get rid of the problem?

It might be related to too short attack and release parameters (?)

Post

Strange, never saw this issue.
What is the pipeline you used and the type of input?

Post

Nevermind, I tested further and I think it's another library ( a filter library) causing it. The filter is also in the signal chain. I had problem earlier with the filter "popping", so this sounds logical.

Post

----
Last edited by -Fluky- on Wed Feb 17, 2016 12:25 pm, edited 1 time in total.

Post

Miles1981 wrote:
Fluky wrote:How do you get the coefficients for a "timevarying" allpass filter?
Or how do you declare the entire timevarying allpass filter?
I only have one example of a time varying filter in Python: https://github.com/mbrucher/AudioTK/blo ... ryingEQ.py
The second port is the one in charge of setting the frequency.
So is this an allpass filter? Also is second port number 2 or number 1 (if 0 is first).

Also what's the range of Q?

Also, what if I want to pass constants to the cutoff port? It asks for a BaseFilter * filter as an input. But what I want to pass a vector of varying constants that I've specified manually. A vector of frequencies. This is equivalent to the problem of being able to adjust the cutoff frequency in a "typical EQ" setting, where the user adjusts the parameters on fly.

Post

This one is a band pass filter, not an all pass.
Q is supposed to be strictly positive (I haven't put the proper checks for now :/)

All ports are supposed to be driven by other filters. If you want to have a filter that is almost always fixed (in terms of parameters), then this filter may not be the best solution.
The only way to drive the cut off inputs is to give them in an array, just like the input data.

Post

Miles1981 wrote: Q is supposed to be strictly positive (I haven't put the proper checks for now :/)
And what's the range of Q? 0.0-16.0? Which end is "narrowest"?

Post

I don't know out of my head, it seems the reference page has disappeared...
I think small Q was narrowest, no upper bound.

Post

I can help you with the documentation, if it's something that I may discover mainly by using the lib and not knowing about the implementation.

Post Reply

Return to “DSP and Plugin Development”