com.meapsoft.featextractors
Class AvgChroma

java.lang.Object
  extended bycom.meapsoft.featextractors.FeatureExtractor
      extended bycom.meapsoft.featextractors.AvgChroma
Direct Known Subclasses:
AvgChromaScalar

public class AvgChroma
extends FeatureExtractor

Averages all spectral frames together into a single feature vector and then converts the vector into a 12-bin chroma Based on AvgMelSpec by Mike Mandel


Field Summary
protected  double[][] chromaWts
           
protected  double[] linSpec
           
protected  int N
           
protected  int outDim
           
 
Constructor Summary
AvgChroma()
           
AvgChroma(int N, int outDim, double sampleRate)
           
 
Method Summary
 java.lang.String description()
          Returns a short string describing what this feature extractor does.
 double[] features(STFT stft, long startFrame, int length)
          Extract features from a chunk of STFT data.
 double hz2octs(double fq)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

chromaWts

protected double[][] chromaWts

linSpec

protected double[] linSpec

N

protected int N

outDim

protected int outDim
Constructor Detail

AvgChroma

public AvgChroma()

AvgChroma

public AvgChroma(int N,
                 int outDim,
                 double sampleRate)
Method Detail

hz2octs

public double hz2octs(double fq)

features

public double[] features(STFT stft,
                         long startFrame,
                         int length)
Description copied from class: FeatureExtractor
Extract features from a chunk of STFT data.

Specified by:
features in class FeatureExtractor

description

public java.lang.String description()
Description copied from class: FeatureExtractor
Returns a short string describing what this feature extractor does.

Specified by:
description in class FeatureExtractor