|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.beadsproject.beads.core.Bead
net.beadsproject.beads.analysis.FeatureExtractor<java.lang.Float,java.lang.Float>
net.beadsproject.beads.analysis.featureextractors.PeakDetector
public class PeakDetector
Detects peaks in a continuous stream of one element inputs. Attach to an
OnsetDetectionFunction (like SpectralDifference) to get Onsets. Use
addMessageListener to receive a message when an onset is detected.
The algorithm follows the one described in: Dixon, S (2006)
"Onset Detection Revisited" Proc. of the 9th Int. Conference on Digital Audio
Effects (DAFx-06), Montreal, Canada, September 18-20, 2006
Field Summary |
---|
Fields inherited from class net.beadsproject.beads.analysis.FeatureExtractor |
---|
featureDescriptions, features, name, numFeatures |
Constructor Summary | |
---|---|
PeakDetector()
|
Method Summary | |
---|---|
void |
addMessageListener(Bead b)
|
void |
addSegmentListener(SegmentListener sl)
Adds the SegmentListener . |
int |
getBufferSize()
Get the correct BufferSize for the OnsetDetector |
int |
getLagInFrames()
|
float |
getLastOnsetValue()
|
void |
process(TimeStamp startTime,
TimeStamp endTime,
java.lang.Float input)
process: assumes input is a 1 element array |
void |
removeMessageListener(Bead b)
|
void |
removeSegmentListener(SegmentListener sl)
Removes the SegmentListener . |
void |
setAlpha(float alpha)
|
void |
setFilter(Buffer b)
Sets the window for the local averaging. |
void |
setResetDelay(float resetDelay)
|
void |
setThreshold(float thresh)
|
Methods inherited from class net.beadsproject.beads.analysis.FeatureExtractor |
---|
addListener, forward, getFeatureDescriptions, getFeatures, getName, getNumberOfFeatures, removeListener, setName, setNumberOfFeatures |
Methods inherited from class net.beadsproject.beads.core.Bead |
---|
getKillListener, isDeleted, isPaused, kill, message, messageReceived, pause, setKillListener, start, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PeakDetector()
Method Detail |
---|
public void setThreshold(float thresh)
public void setAlpha(float alpha)
public void setResetDelay(float resetDelay)
public float getLastOnsetValue()
public int getLagInFrames()
public int getBufferSize()
public void setFilter(Buffer b)
b
- Buffer must be of size == getBufferSize(), and integrates to
1.public void process(TimeStamp startTime, TimeStamp endTime, java.lang.Float input)
process
in class FeatureExtractor<java.lang.Float,java.lang.Float>
input
- the data.public void addMessageListener(Bead b)
public void removeMessageListener(Bead b)
public void addSegmentListener(SegmentListener sl)
SegmentMaker
SegmentListener
.
addSegmentListener
in interface SegmentMaker
sl
- the segment listener.public void removeSegmentListener(SegmentListener sl)
SegmentMaker
SegmentListener
.
removeSegmentListener
in interface SegmentMaker
sl
- the segment listener.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |