File svf.h¶
File List > DaisySP > Source > Filters > svf.h
Go to the documentation of this file
Source Code¶
/*
Copyright (c) 2020 Electrosmith, Corp
Use of this source code is governed by an MIT-style
license that can be found in the LICENSE file or at
https://opensource.org/licenses/MIT.
*/
#pragma once
#ifndef DSY_SVF_H
#define DSY_SVF_H
namespace daisysp
{
class Svf
{
public:
Svf() {}
~Svf() {}
void Init(float sample_rate);
void Process(float in);
void SetFreq(float f);
void SetRes(float r);
void SetDrive(float d);
inline float Low() { return out_low_; }
inline float High() { return out_high_; }
inline float Band() { return out_band_; }
inline float Notch() { return out_notch_; }
inline float Peak() { return out_peak_; }
private:
float sr_, fc_, res_, drive_, freq_, damp_;
float notch_, low_, high_, band_, peak_;
float input_;
float out_low_, out_high_, out_band_, out_peak_, out_notch_;
float pre_drive_, fc_max_;
};
} // namespace daisysp
#endif