Spectrogram
Class WindowFunction

java.lang.Object
  extended by Spectrogram.WindowFunction

public class WindowFunction
extends java.lang.Object

Window function for use with FFT.

Author:
Douglas Gillespie

Field Summary
static int BARTLETT
           
static int BLACKMAN
           
static int BLACKMANHARRIS
           
static int HAMMING
           
static int HANNING
           
private static java.lang.String[] names
           
static int NWINDOWS
           
static int RECTANGULAR
           
 
Constructor Summary
WindowFunction()
           
 
Method Summary
static double[] bartlett(int length)
           
static double[] blackman(int length)
           
static double[] blackmanharris(int length)
           
static java.lang.String[] getNames()
           
static double[] getWindowFunc(int windowType, int length)
           
static double getWindowGain(double[] windowFunction)
          Calculate the gain of the window function
static double[] hamming(int length)
           
static double[] hanning(int length)
           
static double[] rectangular(int length)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RECTANGULAR

public static final int RECTANGULAR
See Also:
Constant Field Values

HAMMING

public static final int HAMMING
See Also:
Constant Field Values

HANNING

public static final int HANNING
See Also:
Constant Field Values

BARTLETT

public static final int BARTLETT
See Also:
Constant Field Values

BLACKMAN

public static final int BLACKMAN
See Also:
Constant Field Values

BLACKMANHARRIS

public static final int BLACKMANHARRIS
See Also:
Constant Field Values

NWINDOWS

public static final int NWINDOWS
See Also:
Constant Field Values

names

private static java.lang.String[] names
Constructor Detail

WindowFunction

public WindowFunction()
Method Detail

getNames

public static java.lang.String[] getNames()

getWindowFunc

public static double[] getWindowFunc(int windowType,
                                     int length)

hamming

public static double[] hamming(int length)

hanning

public static double[] hanning(int length)

rectangular

public static double[] rectangular(int length)

bartlett

public static double[] bartlett(int length)

blackman

public static double[] blackman(int length)

blackmanharris

public static double[] blackmanharris(int length)

getWindowGain

public static double getWindowGain(double[] windowFunction)
Calculate the gain of the window function

Parameters:
windowFunction - window function array
Returns:
window rms gain as a factor (NOT dB);