FFTStatic class

One-shot static FFT utilities.

This class creates and destroys native FFT plans per call. For repeated transforms at a fixed length, prefer RfftPlan or CfftPlan to avoid repeated allocation and planning overhead.

Example:

import 'dart:typed_data';
import 'package:open_dspc/open_dspc.dart';

final x = SignalGenerator.sine(n: 1024, freqHz: 440, sampleRate: 16000);

final spec = FFTStatic.rfft(x);
final mag = FFTStatic.rfftMag(x, mode: SpecMode.mag);
final y = FFTStatic.irfft(spec.real, spec.imag);

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

fft(Float32List real, Float32List imag, {int? n}) Complex32List
Computes the complex forward FFT of a complex-valued input signal.
ifft(Float32List real, Float32List imag, {int? n}) Complex32List
Computes the complex inverse FFT of a complex spectrum.
irfft(Float32List real, Float32List imag, {int? n}) Float32List
Computes the inverse real FFT from a packed positive-frequency spectrum.
rfft(Float32List input, {int? n}) Complex32List
Computes the real-to-complex FFT of a real-valued input signal.
rfftMag(Float32List input, {int? n, SpecMode mode = SpecMode.mag, double dbFloor = -120}) Float32List
Computes a real-input magnitude, power, or dB spectrum.