DaisySP
Loading...
Searching...
No Matches
svf.h
1/*
2Copyright (c) 2020 Electrosmith, Corp
3
4Use of this source code is governed by an MIT-style
5license that can be found in the LICENSE file or at
6https://opensource.org/licenses/MIT.
7*/
8
9#pragma once
10#ifndef DSY_SVF_H
11#define DSY_SVF_H
12
13namespace daisysp
14{
26class Svf
27{
28 public:
29 Svf() {}
30 ~Svf() {}
34 void Init(float sample_rate);
35
36
40 void Process(float in);
41
42
46 void SetFreq(float f);
47
51 void SetRes(float r);
52
56 void SetDrive(float d);
60 inline float Low() { return out_low_; }
64 inline float High() { return out_high_; }
68 inline float Band() { return out_band_; }
72 inline float Notch() { return out_notch_; }
76 inline float Peak() { return out_peak_; }
77
78 private:
79 float sr_, fc_, res_, drive_, freq_, damp_;
80 float notch_, low_, high_, band_, peak_;
81 float input_;
82 float out_low_, out_high_, out_band_, out_peak_, out_notch_;
83 float pre_drive_, fc_max_;
84};
85} // namespace daisysp
86
87#endif
Definition delayline.h:29
Definition svf.h:27
float Band()
Definition svf.h:68
float Low()
Definition svf.h:60
void Process(float in)
Definition svf.cpp:31
float Peak()
Definition svf.h:76
void SetRes(float r)
Definition svf.cpp:71
void Init(float sample_rate)
Definition svf.cpp:8
float High()
Definition svf.h:64
void SetFreq(float f)
Definition svf.cpp:58
float Notch()
Definition svf.h:72
void SetDrive(float d)
Definition svf.cpp:81
FIR Filter implementation, generic and ARM CMSIS DSP based.
Definition adenv.h:16