mirror of
https://github.com/Fihdi/Eurorack.git
synced 2026-04-13 08:05:49 +00:00
21 lines
948 B
C++
21 lines
948 B
C++
#ifndef SynthClave_Lpg_h
|
|
#define SynthClave_Lpg_h
|
|
|
|
|
|
//▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
|
|
class Lpg {
|
|
private:
|
|
float _state = 0.0f;
|
|
|
|
public:
|
|
//▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
|
|
float Process (float input, float cv) {
|
|
_state += cv * (input - _state);
|
|
return _state * cv;
|
|
}
|
|
};
|
|
|
|
|
|
//▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
|
|
#endif // SynthClave_Lpg_h
|