public class AllPassEffect extends AudioEffect16Bit
AllPass
ADD, DO_NOTHING, MULTIPLY
Constructor and Description |
---|
AllPassEffect(int forwardMemSize,
int feedback,
boolean chunked,
float delayInMs,
float sampleRate)
Creates an allpass delay effect with a particular forward memory size.
|
Modifier and Type | Method and Description |
---|---|
short[] |
allPassProcess(short[] input)
Method for non chunked data.
|
short[] |
allPassProcessChunked(short[] input)
Method for chunked data.
|
short[] |
process(short[] input)
Process method calls appropriate allpassProcess or allPassProcessChunked 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.
|
getData, getStart, initialiseForward, initialiseForward, preProcess, setForwardMathOperation
public AllPassEffect(int forwardMemSize, int feedback, 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.
// * @param delayOffset the size of the delay in samples. Used to calculate appropriate buffer sizechunked
- 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 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[] allPassProcess(short[] input)
input
- short array containing the input data to be manipulated by algorithmpublic short[] allPassProcessChunked(short[] input)
input
- short array containing the input data to be manipulated by algorithm