comirva.audio.extraction
Class AudioFeatureExtractionThread

java.lang.Object
  extended by java.lang.Thread
      extended by comirva.audio.extraction.AudioFeatureExtractionThread
All Implemented Interfaces:
Runnable
Direct Known Subclasses:
FluctuationPatternExtractionThread, MandelEllisExtractionThread, TimbreDistributionExtractionThread

public abstract class AudioFeatureExtractionThread
extends Thread

This thread is intended to do a feature extraction batch job. Each file handed to the constructor will be process the given feature extractor. The priority of the thread is low, such that it may run in the background. Any kind of exception during the batch process are reported to the standard log and ignored.

This class is abstract because it has one template method, which should create a DataMatrix object by using the extracted features. Depending on the feature a specialized feature extraction thread may for example return a similarity matrix or a matrix containing vectors.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
(package private)  AudioFeatureExtractor featureExtractor
           
(package private)  List<AudioFeature> features
           
(package private)  File[] files
           
(package private)  Vector<String> meta
           
(package private)  JLabel statusBar
           
(package private)  Workspace ws
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
protected AudioFeatureExtractionThread(AudioFeatureExtractor featureExtractor, File[] files, Workspace ws, JLabel statusBar)
          Creates a new audio feature extraction thread.
 
Method Summary
protected abstract  void createDataMatrix()
          Template method creating the audio feature specific DataMatrix.
 void run()
          Starts processing the feature extraction batch job.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

files

File[] files

featureExtractor

AudioFeatureExtractor featureExtractor

meta

Vector<String> meta

features

List<AudioFeature> features

ws

Workspace ws

statusBar

JLabel statusBar
Constructor Detail

AudioFeatureExtractionThread

protected AudioFeatureExtractionThread(AudioFeatureExtractor featureExtractor,
                                       File[] files,
                                       Workspace ws,
                                       JLabel statusBar)
Creates a new audio feature extraction thread.

Parameters:
featureExtractor - AudioFeatureExtractor the extractor, defining the extraction process
files - File[] the audio files to process
ws - Workspace the workspace object to store the result in
statusBar - JLabel the status bar to show some progress information
Method Detail

run

public void run()
Starts processing the feature extraction batch job.

Specified by:
run in interface Runnable
Overrides:
run in class Thread

createDataMatrix

protected abstract void createDataMatrix()
Template method creating the audio feature specific DataMatrix.