Generic resonator function */
| 36 | |
| 37 | /* Generic resonator function */ |
| 38 | float resonator::resonate(float input) |
| 39 | { |
| 40 | float x = mA * input + mB * mP1 + mC * mP2; |
| 41 | mP2 = mP1; |
| 42 | mP1 = x; |
| 43 | return x; |
| 44 | } |
| 45 | |
| 46 | /* Generic anti-resonator function |
| 47 | Same as resonator except that a,b,c need to be set with initAntiresonator() |