Comments (9)
@redtide edited.
Also, added the All-pass and Notch.
from sfizz.
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?
from sfizz.
brf_2p
is listed in SFZ1 fil_type, I kept them separated.
from sfizz.
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)
from sfizz.
More general notes:
The cutoff is modulable, it means to recompute the filter coeffs, potentially at the audio rate.
- as it is, the operation will be expensive, considering it makes 1 or 2 mathcalls each audio frame (sin, cos, or "sincos" if known to compiler)
- a way to reduce computation, it's to update filter coeffs less frequently. for example, only update every Nth frame (typical N=16).
- in effect, this creates a staircase effect; while probably not perceptible, it needs to check if strong modulation affects the filter stability
- when LFO exists, it should be tested at extreme conditions that the filter stability holds well. one can generate the faust code with internal double precision to improve numerical robustness. (flag
-double
)
from sfizz.
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:
- Filter coeffs will recompute at some particular time intervals, such that it's less computation than updating it every frame. Computing the filter involves trigonometric functions.
- The coeffs are also going to be smoothed (an advice of David), such that it will be more robust in case of strong modulation. Also note than in this configuration, vectorizing is not possible.
- The smoothing is not really calibrated at this point, it was set to a default thing, which means a LFO may possibly lag. I left a TODO comment at
smoothCoefs
.
from sfizz.
Implemented most of filters in the sfz-filters-experimental repo above.
I think code as ready to be copied into sfizz at this point.
- added an optimized specialization for stereo
- added state-variable filters, based on Eric Tarr's Sallen-Key digital model
- had to upgrade the precision to double, as some models were instable (eg. the 6-poles)
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.
from sfizz.
Added the Peaking EQ and shelves.
from sfizz.
Let's move this into the release, thanks alot!
from sfizz.
Related Issues (20)
- ⚠️ Feature requests | non-bug issues in Discussions ⚠️
- bug when off_by is involved and the two midi notes are played exactly at the same time HOT 4
- Transpose vs tune HOT 4
- RAM usage : Samples are continuously loaded in RAM while playing HOT 2
- Error building Arch AUR makepkg HOT 3
- Note-On performance issue
- Support `lotimer` / `hitimer` HOT 4
- Tests fails with the latest Abseil HOT 7
- Invalid output when the number of output is above 1 and using effects
- Compatibility with catch2 >= 3
- Issues when Note on/off at the maximum delay HOT 2
- Ardour freezes for a long time after stopping playback
- All voices are always active after sustain is released HOT 2
- overriding default_path for each sfz mapping HOT 2
- Segfault during use of `sfizz_render` HOT 2
- ampeg_delay make the note play indefinitely HOT 1
- error: no member named 'StrCat' in namespace 'absl' HOT 11
- [question] Is LV2 support present? HOT 2
- Support lotimer / hitimer on release regions
- Add `eqN_keytrack` & `eqN_keycenter`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sfizz.