com.meapsoft.featextractors
Class AvgPitchSimple

java.lang.Object
  extended bycom.meapsoft.featextractors.FeatureExtractor
      extended bycom.meapsoft.featextractors.AvgPitchSimple

public class AvgPitchSimple
extends FeatureExtractor

Picks the strongest fourier harmonic in every frame and calls it the pitch, then average these (weighted by energy) within the frame Based on AvgChroma


Field Summary
protected  double bin2hz
           
protected static int FIRSTBAND
           
protected  double[] linSpec
           
protected  int N
           
protected  double[] pitchWt
           
 
Constructor Summary
AvgPitchSimple()
           
AvgPitchSimple(int N, 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

FIRSTBAND

protected static final int FIRSTBAND
See Also:
Constant Field Values

pitchWt

protected double[] pitchWt

linSpec

protected double[] linSpec

bin2hz

protected double bin2hz

N

protected int N
Constructor Detail

AvgPitchSimple

public AvgPitchSimple()

AvgPitchSimple

public AvgPitchSimple(int N,
                      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