Closed jpcima closed 4 years ago
@redtide edited. Also, added the All-pass and Notch.
Here, I implemented the Hal Chamberlin state-variable filter.
This one fits requirements to implement the *_sv
opcodes, but needs way more precaution.
chamberlin.dsp.gz
Reference: https://www.earlevel.com/main/2003/03/02/the-digital-state-variable-filter/
As noted from the article:
The main drawback of the digital state variable is that it becomes unstable at higher frequencies. It depends on the Q setting, but basically the upper bound of stability is about where f reaches 1, which is at one-sixth of the sample rate (8 kHz at 48 kHz). The only way around this is to oversample. A simple way to double the filter’s sample rate (and thereby double the filter’s frequency range) is to run the filter twice with the same input sample, and discard one output sample.
It means if we want to permit range up to 22 kHz, oversample by 3 and call the filter with 1/3 effective cutoff. (Assuming 44.1 kHz as FsMin)
More general notes:
The cutoff is modulable, it means to recompute the filter coeffs, potentially at the audio rate.
-double
)I made a multimode-filter wrapper class. It is a very simple API. https://github.com/jpcima/sfz-filters-experimental
It's probable that sfizz can use it like it is, however, it will be better if I make also a dedicated stereo wrapper, because then it can optimize filter computations further.
It permits modulation of Cutoff and Q. It works like this:
smoothCoefs
.Implemented most of filters in the sfz-filters-experimental repo above. I think code as ready to be copied into sfizz at this point.
From observation, state-variable variants don't have a lot of difference with ordinary biquads.
In the repo, you can find also a JACK Qt client if you'd like to test these filters.
Added the Peaking EQ and shelves.
Hi @jpcima and thank for all this work. I may not have time until this WE but I will prepare integration then and we can discuss more on a pull request if that's OK with you?
Let's move this into the release, thanks alot!
I attach an implementation of filters which matches ARIA near perfectly. (when implemented there)
It uses some very generic resonant filters, it showed to be quite easy to reproduce them.
Current: sfz-filters ~sfzfilters.dsp.gz~
Reference: https://sfzformat.com/opcodes/fil_type https://sfzformat.com/opcodes/fil2_type
Status:
New ARIA extensions:
Not implemented by ARIA:
Implemented by us, not in specification: