public abstract class IIRFilterBase extends Object
| Modifier and Type | Field and Description |
|---|---|
protected float |
alpha |
protected float |
amplitudeAdj |
protected float |
beta |
protected int |
frequency |
protected float |
gamma |
protected static int |
HISTORYSIZE |
protected float[][] |
inArray |
protected float[][] |
outArray |
protected int |
sampleRate |
| Constructor and Description |
|---|
IIRFilterBase()
Default Constructor - to already set the GAIN
|
| Modifier and Type | Method and Description |
|---|---|
protected float |
calcRadiansPerSample(float freq)
Given a frequency of interest, calculate radians/sample
|
void |
clearHistory()
Clean the history
|
float |
getAmplitudeAdj() |
float |
getGain()
Get the amplitude adjustment in db value
|
static float |
getIIRDBValueFrom(float decimalValue)
convert from DeciBel to decimalValue
|
static float |
getIIRDecimalValueFrom(float dbValue)
Convert from decimalValue to DeciBel
|
protected float |
getThetaZero()
Return the radiant per sample at the frequency of interest
|
void |
initialize(int sampleRate,
int channels,
int frequency,
float parameter)
Call this to initialize.
|
protected abstract float |
performFilterCalculation(float sample,
int channel,
int iIndex,
int jIndex,
int kIndex) |
void |
setAmplitudeAdj(float newAmplitudeAdj)
Set the amplitude adjustment to be applied to filtered data
Values typically range from -.25 to +4.0.
|
void |
setGain(float dbValue)
Set the amplitude adjustment to be applied to filtered data
Values typically range from -12 to +12 db.
|
protected int frequency
protected int sampleRate
protected static final int HISTORYSIZE
protected float[][] inArray
protected float[][] outArray
protected float alpha
protected float beta
protected float gamma
protected float amplitudeAdj
public IIRFilterBase()
public void initialize(int sampleRate,
int channels,
int frequency,
float parameter)
public void clearHistory()
public static float getIIRDecimalValueFrom(float dbValue)
dbValue - public static float getIIRDBValueFrom(float decimalValue)
decimalValue - protected float calcRadiansPerSample(float freq)
freq - protected float getThetaZero()
public void setAmplitudeAdj(float newAmplitudeAdj)
amplitudeAdj - public float getAmplitudeAdj()
public void setGain(float dbValue)
dbValue - public float getGain()
protected abstract float performFilterCalculation(float sample,
int channel,
int iIndex,
int jIndex,
int kIndex)
sample - channel - iIndex - jIndex - kIndex - Copyright © 2014. All rights reserved.