|
|||||||||
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.core.UGen
net.beadsproject.beads.analysis.AudioSegmenter
public abstract class AudioSegmenter
An AudioSegmenter slices incoming audio data into chunks, as implemented by subclasses, usually in their calculateBuffer method, and then notifies any FeatureExtractors or other SegmentListeners that are listening.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class net.beadsproject.beads.core.UGen |
---|
UGen.OutputInitializationRegime, UGen.OutputPauseRegime |
Field Summary |
---|
Fields inherited from class net.beadsproject.beads.core.UGen |
---|
bufferSize, bufIn, bufOut, context, ins, outputInitializationRegime, outputPauseRegime, outs |
Constructor Summary | |
---|---|
AudioSegmenter(AudioContext context)
Instantiates a new Segmenter. |
Method Summary | |
---|---|
void |
addListener(FeatureExtractor<?,float[]> fe)
Adds a FeatureExtractor as a responder to this Segmenter. |
void |
addSegmentListener(SegmentListener sl)
Adds a SegmentListener as a listener to this Segmenter. |
void |
removeSegmentListener(SegmentListener sl)
Removes a SegmentListerner as a listener to this Segmenter. |
abstract void |
resetTimeStamp()
Reset both beginning and last time stamps to zero. |
protected void |
segment(TimeStamp startTime,
TimeStamp endTime,
float[] data)
Called by instantiations of Segmenter, to indicate that a new segment has been created. |
abstract void |
setBeginningTimeStamp(TimeStamp ts)
Set the TimeStamp of this AudioSegmenter when the AudioContext is at t=0. |
abstract void |
setLastTimeStamp(TimeStamp ts)
Set the last TimeStamp of this AudioSegmenter. |
java.lang.String |
toString()
Returns a String specifying the Bead's class and it's name. |
Methods inherited from class net.beadsproject.beads.core.UGen |
---|
addDependent, addInput, addInput, calculateBuffer, clearDependents, clearInputConnections, containsInput, crossfadeInput, getConnectedInputs, getContext, getEnvelopes, getIns, getNumberOfConnectedUGens, getNumberOfDependents, getOutBuffer, getOuts, getTimeTakenLastUpdate, getValue, getValue, getValueDouble, getValueDouble, initializeOuts, isTimerMode, isUpdated, noInputs, pause, printInBuffers, printInputList, printOutBuffers, removeAllConnections, removeConnection, removeDependent, setOutsToPause, setTimerMode, setValue, update, zeroIns, zeroOuts |
Methods inherited from class net.beadsproject.beads.core.Bead |
---|
getKillListener, getName, isDeleted, isPaused, kill, message, messageReceived, setKillListener, setName, start |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AudioSegmenter(AudioContext context)
context
- the AudioContext.Method Detail |
---|
public void addListener(FeatureExtractor<?,float[]> fe)
fe
- the FeatureExtractor.public void addSegmentListener(SegmentListener sl)
addSegmentListener
in interface SegmentMaker
sl
- the SegmentListener.public void removeSegmentListener(SegmentListener sl)
removeSegmentListener
in interface SegmentMaker
sl
- the SegmentListerner.protected void segment(TimeStamp startTime, TimeStamp endTime, float[] data)
startTime
- double indicating the start time of the data chunk in milliseconds.endTime
- double indicating the end time of the data chunk in milliseconds.data
- the audio data.public abstract void resetTimeStamp()
public abstract void setBeginningTimeStamp(TimeStamp ts)
ts
- public abstract void setLastTimeStamp(TimeStamp ts)
ts
- public java.lang.String toString()
Bead
toString
in class Bead
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |