public class MusicalNoteOnsetDetector extends AudioProcessor
MusicalNoteFilterBank
to determine the power output of
the notes of a western scale over the frame. It calculates the power
difference between successive frames to determine whether a new note
has been detected.Constructor and Description |
---|
MusicalNoteOnsetDetector() |
Modifier and Type | Method and Description |
---|---|
boolean |
hasOnsetBeenDetected()
Returns whether an onset was detected during the last processing cycle.
|
SampleChunk |
process(SampleChunk sample)
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 MusicalNoteOnsetDetector()
public SampleChunk process(SampleChunk sample) throws Exception
process
in class AudioProcessor
sample
- The sample chunk to process.Exception
- If the processing could not take placeAudioProcessor.process(org.openimaj.audio.SampleChunk)
public boolean hasOnsetBeenDetected()