FahlGrahn Audio
v1.0.0
Loading...
Searching...
No Matches
IFilter.h
1
#pragma once
2
3
#include "../IDsp.h"
4
#include <memory>
5
6
class
IFilter
:
public
IDsp
7
{
8
public
:
9
enum
Type
10
{
11
kHighPass,
12
kLowPass,
13
kLowShelf,
14
kHighShelf,
15
kPeak,
16
kNumTypes
17
};
18
19
virtual
~IFilter
() =
default
;
20
21
virtual
void
setFrequency(
const
double
frequency) = 0;
22
virtual
void
setGain(
const
double
gaindB) = 0;
23
virtual
void
setQ(
const
double
q) = 0;
24
virtual
void
setSampleRate(
const
double
sampleRate) = 0;
25
virtual
double
filterResponse(
double
sampleRate,
double
currentFreq) = 0;
26
27
bool
isEnabled{
true
};
28
29
private
:
30
};
31
32
std::unique_ptr<IFilter> createFilter(IFilter::Type filterType,
double
startFrequency,
int
filterOrder = 2);
IDsp
Definition
IDsp.h:4
IFilter
Definition
IFilter.h:7
utilities
dsp
filters
IFilter.h
Generated by
1.12.0