public class EnvelopeDetector extends Object
The input signal is filtered by a bandpass filter before the envelope is detected.
Constructor and Description |
---|
EnvelopeDetector(int samplingRate)
Constructs an envelope detector with default parameters for audio / speech.
|
EnvelopeDetector(int samplingRate,
double attackTime,
double releaseTime,
IirFilter iirFilter)
Constructs an envelope detector.
|
Modifier and Type | Method and Description |
---|---|
float[] |
process(float[] in)
Processes an array of input signal values and returns an array containing the envelope levels.
|
double |
step(double inputValue)
Processes one input signal value and returns the current envelope level.
|
public EnvelopeDetector(int samplingRate)
samplingRate
- Sampling rate in Hz.public EnvelopeDetector(int samplingRate, double attackTime, double releaseTime, IirFilter iirFilter)
samplingRate
- Sampling rate in Hz.attackTime
- Attack time of the envelope detector in seconds (time for 1/e convergence).releaseTime
- Release time of the envelope detector in seconds (time for 1/e convergence).iirFilter
- Filter for pre-processing the signal. May be null to bypass filtering.