public class LowPassEffect extends AudioEffect16Bit
CombDelay
,
triana.audio.AudioEffect16Bit
ADD, DO_NOTHING, MULTIPLY
Constructor and Description |
---|
LowPassEffect(int forwardMemSize,
int feedback,
java.lang.String filterType,
boolean chunked,
float delayInMs,
float sampleRate)
Creates an comb filter delay effect with a particular forward memory size.
|
Modifier and Type | Method and Description |
---|---|
short[] |
combProcess(short[] input)
Method for non chunked data.
|
short[] |
combProcessChunked(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 |
setDelayOffset(float offset)
Sets the delay size in samples that the delayed signal will be delayed by
|
void |
setFeedback(int feed)
Sets the feedback factor.
|
void |
setFilterType(java.lang.String filt)
Sets the type of filter to be used to create the delay.
|
getData, getStart, initialiseForward, initialiseForward, preProcess, setForwardMathOperation
public LowPassEffect(int forwardMemSize, int feedback, java.lang.String filterType, boolean chunked, float delayInMs, float sampleRate)
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 setFeedback(int feed)
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 setFilterType(java.lang.String filt)
filt
- the type of filter to create the delaypublic 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[] combProcess(short[] input)
input
- short array containing the input data to be manipulated by algorithmpublic short[] combProcessChunked(short[] input)
input
- short array containing the input data to be manipulated by algorithm