net.beadsproject.beads.analysis
Class AudioSegmenter
java.lang.Object
net.beadsproject.beads.core.Bead
net.beadsproject.beads.core.UGen
net.beadsproject.beads.analysis.AudioSegmenter
- All Implemented Interfaces:
- SegmentMaker
- Direct Known Subclasses:
- ControllableAudioSegmenter, ShortFrameSegmenter
public abstract class AudioSegmenter
- extends UGen
- implements SegmentMaker
Methods inherited from class net.beadsproject.beads.core.UGen |
addDependent, addInput, addInput, calculateBuffer, clearInputConnections, containsInput, getContext, getIns, getNumberOfConnectedUGens, getOuts, getValue, getValue, initializeOuts, isUpdated, noInputs, pause, printInBuffers, printInputList, printOutBuffers, removeAllConnections, removeDependent, setValue, update, zeroIns, zeroOuts |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
AudioSegmenter
public AudioSegmenter(AudioContext context)
- Instantiates a new Segmenter.
- Parameters:
context
- the AudioContext.
addListener
public void addListener(FeatureExtractor<?,float[]> fe)
- Adds a FeatureExtractor as a responder to this Segmenter.
- Parameters:
fe
- the FeatureExtractor.
addSegmentListener
public void addSegmentListener(SegmentListener sl)
- Adds a SegmentListener as a listener to this Segmenter.
- Specified by:
addSegmentListener
in interface SegmentMaker
- Parameters:
sl
- the SegmentListener.
removeSegmentListener
public void removeSegmentListener(SegmentListener sl)
- Removes a SegmentListerner as a listener to this Segmenter.
- Specified by:
removeSegmentListener
in interface SegmentMaker
- Parameters:
sl
- the SegmentListerner.
segment
protected void segment(TimeStamp startTime,
TimeStamp endTime,
float[] data)
- Called by instantiations of Segmenter, to indicate that a new segment has been created.
- Parameters:
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.
toString
public java.lang.String toString()
- Description copied from class:
Bead
- Returns a String specifying the Bead's class and it's name.
- Overrides:
toString
in class Bead
- Returns:
- String describing the Bead.