-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
184 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
============================================================================== | ||
Filter.cpp | ||
Created: 15 Jun 2020 9:51:45pm | ||
Author: August | ||
============================================================================== | ||
*/ | ||
|
||
#include "AugsFilter.h" | ||
|
||
void AugsFilter::ProcessSample(double& Sample) | ||
{ | ||
switch (mMode) | ||
{ | ||
case FILTER_LOW_PASS: | ||
Sample = mFilter.lores(Sample, mFreq, mRes); | ||
break; | ||
case FILTER_HIGH_PASS: | ||
Sample = mFilter.hires(Sample, mFreq, mRes); | ||
break; | ||
case FILTER_BAND_PASS: | ||
Sample = mFilter.bandpass(Sample, mFreq, mRes); | ||
break; | ||
case FILTER_OFF: | ||
return; | ||
default: | ||
return; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
============================================================================== | ||
Filter.h | ||
Created: 15 Jun 2020 9:51:57pm | ||
Author: August | ||
============================================================================== | ||
*/ | ||
|
||
#pragma once | ||
#include "maximilian.h" | ||
|
||
|
||
class AugsFilter | ||
{ | ||
public: | ||
enum FilterMode | ||
{ | ||
FILTER_LOW_PASS = 0, | ||
FILTER_HIGH_PASS, | ||
FILTER_BAND_PASS, | ||
FILTER_OFF, | ||
kNumOscillatorModes | ||
}; | ||
inline void setFreq(double newFreq) { mFreq = newFreq; } | ||
inline void setRes(double newRes) { mRes = newRes; }; | ||
inline void setMode(FilterMode newMode) { mMode = newMode; } | ||
void ProcessSample(double& Sample); | ||
|
||
AugsFilter() : mMode(FILTER_OFF), mFreq(0.0), mRes(1.0) {} | ||
~AugsFilter() {} | ||
private: | ||
FilterMode mMode; | ||
double mFreq; | ||
double mRes; | ||
maxiFilter mFilter; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.