Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## ddf.minim.analysis
Class DFT

    java.lang.Object
      ddf.minim.analysis.FourierTransform
          ddf.minim.analysis.DFT

    public class DFT

extends FourierTransform

DFT stands for Discrete Fourier Transform and is the most widely used Fourier Transform. You will never want to use this class due to the fact that it is a brute force implementation of the DFT and as such is quite slow. Use an FFT instead. This exists primarily as a way to ensure that other implementations of the DFT are working properly. This implementation expects an even `timeSize` and will throw and IllegalArgumentException if this is not the case.

Author:
  Damien Di Fede
See Also:
  `FourierTransform`, `FFT`, The Discrete Fourier Transform

Field Summary

Fields inherited from class ddf.minim.analysis.FourierTransform
`averages, avgPerOctave, bandWidth, HAMMING, imag, LINAVG, LOGAVG, NOAVG, NONE, octaves, real, sampleRate, spectrum, timeSize, TWO_PI, whichAverage, whichWindow`

Constructor Summary
`DFT(int timeSize, float sampleRate)` Constructs a DFT that expects audio buffers of length `timeSize` that have been recorded with a sample rate of `sampleRate`.

Method Summary
`protected void` | `allocateArrays()`
`void` | `forward(float[] samples)` Performs a forward transform on `buffer`.
`void` | `inverse(float[] buffer)` Performs an inverse transform of the frequency spectrum and places the result in `buffer`.
`void` | `scaleBand(int i, float s)` Not currently implemented.
`void` | `setBand(int i, float a)` Not currently implemented.

Methods inherited from class ddf.minim.analysis.FourierTransform
`avgSize, calcAvg, doWindow, fillSpectrum, forward, freqToIndex, getAvg, getBand, getBandWidth, getFreq, hamming, inverse, inverse, linAverages, logAverages, noAverages, scaleFreq, setComplex, setFreq, specSize, timeSize, window`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DFT

    public DFT(int timeSize,
               float sampleRate)

  Constructs a DFT that expects audio buffers of length `timeSize` that have been recorded with a sample rate of `sampleRate`. Will throw an IllegalArgumentException if `timeSize` is not even.

  Parameters:
    `timeSize` - the length of the audio buffers you plan to analyze
    `sampleRate` - the sample rate of the audio samples you plan to analyze

Method Detail

### allocateArrays

    protected void allocateArrays()

  Specified by:
    `allocateArrays` in class `FourierTransform`

### scaleBand

    public void scaleBand(int i,
                          float s)

  Not currently implemented.

  Specified by:
    `scaleBand` in class `FourierTransform`
  Parameters:
    `i` - the frequency band to modify
    `s` - the scaling factor

### setBand

    public void setBand(int i,
                        float a)

  Not currently implemented.

  Specified by:
    `setBand` in class `FourierTransform`
  Parameters:
    `i` - the frequency band to modify
    `a` - the new amplitude

### forward

    public void forward(float[] samples)

  Description copied from class: `FourierTransform`
  Performs a forward transform on `buffer`.

  Specified by:
    `forward` in class `FourierTransform`
  Parameters:
    `samples` - the buffer to analyze

### inverse

    public void inverse(float[] buffer)

  Description copied from class: `FourierTransform`
  Performs an inverse transform of the frequency spectrum and places the result in `buffer`.

  Specified by:
    `inverse` in class `FourierTransform`
  Parameters:
    `buffer` - the buffer to place the result of the inverse transform in

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD