net.beadsproject.beads.analysis
Class AudioSegmenter

java.lang.Object
  extended by net.beadsproject.beads.core.Bead
      extended by net.beadsproject.beads.core.UGen
          extended by net.beadsproject.beads.analysis.AudioSegmenter
All Implemented Interfaces:
SegmentMaker
Direct Known Subclasses:
ControllableAudioSegmenter, ShortFrameSegmenter

public abstract class AudioSegmenter
extends UGen
implements SegmentMaker


Nested Class Summary
 
Nested classes/interfaces inherited from class net.beadsproject.beads.core.UGen
UGen.OutputInitializationRegime
 
Field Summary
 
Fields inherited from class net.beadsproject.beads.core.UGen
bufferSize, bufIn, bufOut, context, ins, outputInitializationRegime, 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.
protected  void segment(TimeStamp startTime, TimeStamp endTime, float[] data)
          Called by instantiations of Segmenter, to indicate that a new segment has been created.
 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, 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 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

AudioSegmenter

public AudioSegmenter(AudioContext context)
Instantiates a new Segmenter.

Parameters:
context - the AudioContext.
Method Detail

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.