How do some plugins contain so many filters?

For general discussion related FlowStone
Post Reply
User avatar
guyman
Posts: 207
Joined: Fri Mar 02, 2018 8:27 pm

How do some plugins contain so many filters?

Post by guyman »

I've been implementing ZDF filters into a lot of my recent creations, and have many more ideas I'll soon flesh out. I've seen many plugins on the market (waves, fabfilter etc...) contain MANY FILTERS (30+) running simultaneously with NUMEROUS slope values (duplicates in chain??2x, 3x, 6x amount of filters??!) and I've seen some schematics here on the forum that utilize A LOT of filters (spogg, martin) and even after poking around I can't figure out how it is everyone but me is able to keep CPU down to nil in a schematic/vst whilst having it contain so many filters/filter chains....

Also when I start getting into guis, I find my self running 2 chains, one in mono/pack for my filters, another in poly for an impulse response for my visualizer/graph.... is this wrong? how can I max out my level of filters? should I be coding them all at once? should the redundant slope chains be done in code instead of a chain? I think I could use infinite amounts given the chance....

Any advice would be appreciated.
User avatar
martinvicanek
Posts: 1334
Joined: Sat Jun 22, 2013 8:28 pm

Re: How do some plugins contain so many filters?

Post by martinvicanek »

There are a few things you can do to cut down CPU load:
1. Updating filter parameters usually does not have to be done every sample. Use hop(16) for modulation and consider green or Ruby for static filter parameters.
2. Avoid using buit-in stream functions like pow(), sin() etc. Use these instead.
3. Pack the signal to mono4 where possible.
4. If you are willing to enter the world of assembly, optimize your code.
User avatar
guyman
Posts: 207
Joined: Fri Mar 02, 2018 8:27 pm

Re: How do some plugins contain so many filters?

Post by guyman »

Thanks Martin.
This hop (16) thing is over my head.
User avatar
martinvicanek
Posts: 1334
Joined: Sat Jun 22, 2013 8:28 pm

Re: How do some plugins contain so many filters?

Post by martinvicanek »

guyman wrote:Thanks Martin.
This hop (16) thing is over my head.

It is simpler than what you probably think. A code like this

Code: Select all

hop(16){
// update filter parameters
}

// compute next sample

would process each sample, however the filter parameters would only be updated every 16 samples. Check the manual.
User avatar
guyman
Posts: 207
Joined: Fri Mar 02, 2018 8:27 pm

Re: How do some plugins contain so many filters?

Post by guyman »

ok Martin, will do.

Thanks !
Post Reply