-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IIR EQ base class #294
IIR EQ base class #294
Conversation
This allows to create most of fidlib filters. Added a Butterworth4 filter to test it out.
Repaired ramping (regression from last commit)
@badescunicu please have a look. Thank you. |
@@ -1,69 +1,29 @@ | |||
#ifndef ENGINEFILTEBESSEL4_H | |||
#define ENGINEFILTEBESSEL4_H |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You forgot an "R" : ENGINEFILTERBESSEL4_H
LGTM. It is a nice addition because a lot of code was duplicated before. |
Notes addressed. Any one else willing to review? |
#define IIR_BP 1 | ||
#define IIR_HP 2 | ||
|
||
template<unsigned int SIZE, unsigned int PASS> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PASS should be an enum or enum class.
do we have any tests so we can prove this is a noop? I would be satisfied with running data through the old version and making "golden data" out of that to test against. |
Do you think we need a Test in terms of Google test? |
@ywwg: Is it merge-able now? |
double cross_inc = 2.0 / static_cast<double>(iBufferSize); | ||
for (int i = 0; i < iBufferSize; i += 2) { | ||
// Do a linear cross fade between the old samples and the new samples | ||
// Fade input of the new filter, bacause it is settled for In = 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please change bacause to because
Beside the style nitpicks and the comment about your new fading code LGTM. A test that the copied processSample function still produce the same result would be nice but I also feel comfortable merging this without |
This avoids the gain drop during filter change, and is a good compromise between a setteld filter and latency.
Thank you for review. I will merge it now since this is the base of all upcoming EQ PRs and it will be tested a lot during those tests. |
news(release): add 2.3.5 release blog post
This introduces a common base class for all fidlib based Filters.
It makes use of templates to be generic as possible, without introducing CPU overhead.