AudioTK library

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

Post

Fluky wrote:Is it normal to get a crash when trying to use the classes as pointers?

E.g.

ATK::InPointerFilter<double> * inpL;
inpL = new ATK::InPointerFilter<double>(in1, 1, nFrames, false);

is enough to crash the plug-in in startup.

However,

ATK::InPointerFilter<double> inpL;
inpL.set_pointer(in1, nFrames);

doesn't crash.
I guess the constructor version is not working properly. Let me have a look. You should definitely rely on the second version more, as the pipeline is static and all the optimizations with arrays forwarding instead of copying works. Thinking of it, that may be the reason. If you change the inpL at each iteration, then the next plugin may not update the input array properly... I'll check this and add an issue on the tracker.

Post

Fluky wrote:Trying to do a very simple chain crashes the plug-in at startup:
Okay I think it was missing outpL.set_pointer(ou1, nFrames);
Yes, you need the pointer for the output as well, there is no additional storage in these filters.

Post

So I'm getting a crash now when plugging an array to ATK:InPointerFilter<double> and then to the second port of ATK::TimeVaryingAllPassCoefficients<double>.

Do I need to set something in ATK::TimeVaryingAllPassCoefficients<double> in addition to setting the .set_pointer (of the InPointerFilter going into the filter port 1) to point to the array that holds the modulation?

Perhaps:

.set_Q()
.set_min_frequency()
.set_max_frequency()
.set_number_of_steps()

are mandatory settings for the filter?

Post

You definitely need to set up the state of the filter, the range of frequencies you want with the number of steps and Q (probably in the order you specified). Otherwise you end up shooting out of the range and for efficiency reasons, I'm not checking this in release mode (perhaps not even in debug mode, I'll have to check).

Post

I set them, but I'm still getting a crash when I try to run the .process() of the chain with the cutoff being modulated.

The code is a bit long to post here.

---

Aha. The problem was

ATKfiltL.set_input_port(1, &cutoffL, 1);

There's no output port 1, that last parameter should be 0.

Post

Strange, it should work, although with a frequency different than the one you wanted...
More info on the crash would be helpful.

The issue with changing filters on the fly is solved (but it is slower than keeping the pipeline "constant").

Post

Fluky wrote:I set them, but I'm still getting a crash when I try to run the .process() of the chain with the cutoff being modulated.

The code is a bit long to post here.

---

Aha. The problem was

ATKfiltL.set_input_port(1, &cutoffL, 1);

There's no output port 1, that last parameter should be 0.
To have more meaningful crashes, you can catch all exceptions raised and display them somehow. This crash is such an exception, with e.what() a simple explanation on the cause of the crash.

I got bit by this one several hundred times ;)

Post

I think it's working now, but I'm not sure if it's going to do what I mean to do (dynamic EQ).

Do you have any idea how to mix the allpassed signal to the input signal in order to hear filtering?

Post

If you sum them, you should hear the result and check with a spectrum analyzer (like Voxengo SPAN) that you have the notch where you want.

Post

Doing 0.5*in+0.5*allpass doesn't really do anything audible.

Post

You mean in the band you want modified?
You can try first with a big [min; max] frequency (like 100 to 10000) and then put in a sinus generator spanning these frequencies. This should make something audible. I hope...

Post

It should be audible even if it was just a static band. I tried different frequencies.

Post

Switching the Allpass to Bandpass and trying to listen the output of the chain. There's no effect at all!

Post

It's like the chain seems working, but it doesn't produce the audible effect its supposed. Audio definitely passes through it, because I can output the arrays that the chain outputs to. But they contain no effect.

Post

That's really strange. I have an example with a time varying band pass that works as expected (https://github.com/mbrucher/AudioTK/blo ... ryingEQ.py), so I think that should also be the same here. Are you sure the frequencies are setup properly in the filter?

Post Reply

Return to “DSP and Plugin Development”