be.hogent.tarsos.ui.pitch
Class HistogramData

java.lang.Object
  extended by be.hogent.tarsos.ui.pitch.HistogramData
All Implemented Interfaces:
AnnotationListener, AudioFileChangedListener

public class HistogramData
extends java.lang.Object
implements AudioFileChangedListener, AnnotationListener


Method Summary
 void addAnnotation(Annotation annotation)
          Add an annotation to the element.
 void annotationsAdded()
          Is called after a list of annotations is added.
 void audioFileChanged(AudioFile newAudioFile)
           
 void clearAnnotations()
          Clears all annotations.
 void clearHistograms()
           
 boolean containsKey(PitchDetectionMode source)
           
 void extractionFinished()
          A hook to react to annotation extraction.
 void extractionStarted()
          A hook to react to annotation extraction.
 Histogram getFirst()
           
 Histogram getHistogram(PitchDetectionMode mode)
           
static HistogramData getPitchClassHistogramInstance()
           
static HistogramData getPitchHistogramInstance()
           
 boolean isEmpty()
           
 void setComponentToRepaint(javax.swing.JComponent component)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getPitchHistogramInstance

public static HistogramData getPitchHistogramInstance()

getPitchClassHistogramInstance

public static HistogramData getPitchClassHistogramInstance()

clearHistograms

public void clearHistograms()

isEmpty

public boolean isEmpty()

getFirst

public Histogram getFirst()

setComponentToRepaint

public void setComponentToRepaint(javax.swing.JComponent component)

audioFileChanged

public void audioFileChanged(AudioFile newAudioFile)
Specified by:
audioFileChanged in interface AudioFileChangedListener

getHistogram

public Histogram getHistogram(PitchDetectionMode mode)

addAnnotation

public void addAnnotation(Annotation annotation)
Description copied from interface: AnnotationListener
Add an annotation to the element.

Specified by:
addAnnotation in interface AnnotationListener
Parameters:
annotation - The annotation to add: this method is called a lot. After a clearAnnotations() call a very large number of annotations is possible. So efficiently adding annotations should be possible or threaded.

containsKey

public boolean containsKey(PitchDetectionMode source)

clearAnnotations

public void clearAnnotations()
Description copied from interface: AnnotationListener
Clears all annotations.

Specified by:
clearAnnotations in interface AnnotationListener

annotationsAdded

public void annotationsAdded()
Description copied from interface: AnnotationListener
Is called after a list of annotations is added.

Specified by:
annotationsAdded in interface AnnotationListener

extractionStarted

public void extractionStarted()
Description copied from interface: AnnotationListener
A hook to react to annotation extraction. This method is called when pitch annotations starts on an audio file.

Specified by:
extractionStarted in interface AnnotationListener

extractionFinished

public void extractionFinished()
Description copied from interface: AnnotationListener
A hook to react to annotation extraction. This method is called when pitch annotations is completed.

Specified by:
extractionFinished in interface AnnotationListener