public class BeatDetector extends AudioProcessor
Modifier and Type | Field and Description |
---|---|
static float |
BEAT_RTIME
Release time of envelope detector in seconds
|
static float |
FREQ_LP_BEAT
Low Pass filter frequency
|
static float |
T_FILTER
Low Pass filter time constant
|
Modifier | Constructor and Description |
---|---|
|
BeatDetector(AudioFormat af)
Default constructor
|
|
BeatDetector(AudioStream as)
Chainable constructor
|
protected |
BeatDetector(AudioStream as,
AudioFormat af)
Chainable constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
beatDetected()
Returns whether a beat was detected within this sample chunk.
|
AudioTimecode |
getBeatTimecode()
Returns the timecode at which the first beat in this sample chunk
was detected.
|
SampleChunk |
process(SampleChunk samples)
Function that takes a sample chunk and processes the chunk.
|
getLength, getUnderlyingStream, nextSampleChunk, process, processingComplete, reset, setUnderlyingStream
iterator, seek
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public static final float FREQ_LP_BEAT
public static final float T_FILTER
public static final float BEAT_RTIME
public BeatDetector(AudioFormat af)
af
- The format of the incoming data.public BeatDetector(AudioStream as)
as
- The audio stream to processprotected BeatDetector(AudioStream as, AudioFormat af)
as
- The audio stream to processaf
- The format to process.public SampleChunk process(SampleChunk samples)
process
in class AudioProcessor
samples
- The sample chunk to process.AudioProcessor.process(org.openimaj.audio.SampleChunk)
public boolean beatDetected()
public AudioTimecode getBeatTimecode()