public class BandPassEffect extends AudioEffect16Bit
triana.audio.processing.delay.HighPass
,
triana.audio.AudioEffect16Bit
ADD, DO_NOTHING, MULTIPLY
Constructor and Description |
---|
BandPassEffect(int forwardMemSize,
float frequency,
boolean chunked,
float delayInMs,
float sampleRate,
float Q,
float dbGain)
Creates an comb filter delay effect with a particular forward memory size.
|
Modifier and Type | Method and Description |
---|---|
short[] |
bandPassProcess(short[] input)
Method for non chunked data.
|
short[] |
bandPassProcessChunked(short[] input)
Method for chunked data.
|
short[] |
process(short[] input)
Process method calls appropriate combProcess or combProcessChunked method depending on the users decision to use or
not chunked data.
|
void |
setChunked(boolean chunk)
Determines whether chunked data is being used or not.
|
void |
setDBGain(float gain)
Sets the delay size in samples that the delayed signal will be delayed by
|
void |
setDelayOffset(float offset)
Sets the delay size in samples that the delayed signal will be delayed by
|
void |
setFrequency(float freq)
Sets the feedback factor.
|
void |
setQ(float qValue)
Sets the delay size in samples that the delayed signal will be delayed by
|
getData, getStart, initialiseForward, initialiseForward, preProcess, setForwardMathOperation
public BandPassEffect(int forwardMemSize, float frequency, boolean chunked, float delayInMs, float sampleRate, float Q, float dbGain)
forwardMemSize
- the size of the forward memory to be used by AudioEffect16bit class.feedback
- the level of attenutation of the delayed signal in the the feedback comb filter. Should be
divided by 100 to give value in percent.delayOffset
- the size of the delay in samples. Used to calculate appropriate buffer sizefilterType
- sets which type of filter to use. Can be Standard Feedback Filter or Feedback Loop Onlychunked
- boolean value to indicate if the user is using chunked data. Used by process method to
choose suitable method.public void setFrequency(float freq)
feed
- the level of feedback. This value must be divided by 100 in order to be used, as the feedback factor
must be less than 1.public void setDelayOffset(float offset)
offset
- this is the size of the delay in samples. This is used to set the forward buffer when using chunks,
and also to calculate the size of the final output array.public void setQ(float qValue)
offset
- this is the size of the delay in samples. This is used to set the forward buffer when using chunks,
and also to calculate the size of the final output array.public void setDBGain(float gain)
qValue
- this is the size of the delay in samples. This is used to set the forward buffer when using chunks,
and also to calculate the size of the final output array.public void setChunked(boolean chunk)
chunk
- returns true if the user has indicated that chunked data is being used.public short[] process(short[] input)
input
- short array containing the input data to be passed on to respective methodpublic short[] bandPassProcess(short[] input)
input
- short array containing the input data to be manipulated by algorithmpublic short[] bandPassProcessChunked(short[] input)
input
- short array containing the input data to be manipulated by algorithm