C# Class GAudio.FFTModule

A Monobehaviour component that enables inspecotr friendly configuration of FFT processing, including windowing of the original data and formatting of the output.
Inheritance: UnityEngine.MonoBehaviour
Afficher le fichier Open project: gregzo/G-Audio

Méthodes publiques

Свойство Type Description
customFftSize int
fftSize FFTSize
fromFrequency int
output FFTOutput
toFrequency int
useWindowFunction bool
window WindowFunction

Méthodes publiques

Méthode Description
Awake ( ) : void
ComputeDB ( float data ) : void
ComputeMagnitudes ( float data ) : void
ComputeSquareMagnitudes ( float data ) : void
RealFFT ( float data ) : void

Performs windowed in place real FFT of the passed data array, reusing a cached array for the imaginary part. Formats the specified frequency bins according to FFTOutput.

SetWindow ( WindowFunction windowFunction ) : void

Sets and pre-computes the specified WindowFunction for faster processing.

Method Details

Awake() public méthode

public Awake ( ) : void
Résultat void

ComputeDB() public méthode

public ComputeDB ( float data ) : void
data float
Résultat void

ComputeMagnitudes() public méthode

public ComputeMagnitudes ( float data ) : void
data float
Résultat void

ComputeSquareMagnitudes() public méthode

public ComputeSquareMagnitudes ( float data ) : void
data float
Résultat void

RealFFT() public méthode

Performs windowed in place real FFT of the passed data array, reusing a cached array for the imaginary part. Formats the specified frequency bins according to FFTOutput.
public RealFFT ( float data ) : void
data float
Résultat void

SetWindow() public méthode

Sets and pre-computes the specified WindowFunction for faster processing.
public SetWindow ( WindowFunction windowFunction ) : void
windowFunction WindowFunction
Résultat void

Property Details

customFftSize public_oe property

If fftSize is set to FFTSize.Custom this value will be used instead of the audio buffer's size. Note that only power of 2 values are valid.
public int customFftSize
Résultat int

fftSize public_oe property

public FFTSize fftSize
Résultat FFTSize

fromFrequency public_oe property

The lowest frequency we are interested in. The lowest relevant value is SampleRate / FFT size, but higher values can be specified.
public int fromFrequency
Résultat int

output public_oe property

public FFTOutput output
Résultat FFTOutput

toFrequency public_oe property

The highest frequency we are interested in. The highest relevant frequency is SampleRate/2 ( Nyquist frequency ). but lower values can be specified.
public int toFrequency
Résultat int

useWindowFunction public_oe property

public bool useWindowFunction
Résultat bool

window public_oe property

public WindowFunction window
Résultat WindowFunction