auto-sync
This commit is contained in:
parent
2f7523809a
commit
c5707c43ed
|
@ -8,17 +8,18 @@
|
|||
#include "biquad.h"
|
||||
|
||||
Biquad::Biquad() {
|
||||
a0 = a1 = a2 = b1 = b2;
|
||||
z1 = z2 = 0;
|
||||
}
|
||||
|
||||
void Biquad::initValue(float input DECLARE_ENGINE_PARAMETER_S) {
|
||||
a0 = 0.0000024635293743901;
|
||||
a1 = 0.00000492705874878021;
|
||||
a2 = 0.0000024635293743901;
|
||||
b1 = -1.9968534854;
|
||||
b2 = 0.9968633396;
|
||||
|
||||
z1 = z2 = 0;
|
||||
}
|
||||
|
||||
void Biquad::initValue(float input) {
|
||||
z1 = input * (1 - a0);
|
||||
z1 = input * (1 - a0);
|
||||
z2 = input * (1 - a0 - a1 + b1);
|
||||
}
|
||||
|
||||
|
|
|
@ -8,10 +8,12 @@
|
|||
#ifndef CONTROLLERS_MATH_BIQUAD_H_
|
||||
#define CONTROLLERS_MATH_BIQUAD_H_
|
||||
|
||||
#include "engine.h"
|
||||
|
||||
class Biquad {
|
||||
public:
|
||||
Biquad();
|
||||
void initValue(float input);
|
||||
void initValue(float input DECLARE_ENGINE_PARAMETER_S);
|
||||
float getValue(float input);
|
||||
|
||||
float a0, a1, a2, b1, b2;
|
||||
|
|
Loading…
Reference in New Issue