STFT class

Inheritance

Constructors

STFT({required int nFft, int? winLen, required int hop, StftWindow window = StftWindow.hann, bool meanSubtract = false, bool center = false})
Creates a reusable native STFT context.
factory
STFT.offline({required int nFft, int? winLen, required int hop, StftWindow window = StftWindow.hann, bool meanSubtract = false, bool center = false})
Creates an STFT context intended for whole-buffer processing.
factory
STFT.streaming({required int nFft, int? winLen, required int hop, StftWindow window = StftWindow.hann, bool meanSubtract = false, bool center = false})
Creates an STFT context intended for repeated chunked input.
factory

Properties

bins int
final
center bool
final
hashCode int
The hash code for this object.
no setterinherited
hop int
final
isClosed bool
Whether close() has been called.
no setterinherited
maxFlushFrames int
Maximum number of frames a flush can emit for the current overlap setup.
no setter
meanSubtract bool
final
nFft int
final
res → _StftResource
Throws if closed; returns the native resource otherwise.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
window StftWindow
final
winLen int
final

Methods

close() → void
Deterministic cleanup.
inherited
flush() STFTFrames
Flushes the tail of a streaming run and returns the remaining complex frames.
flushSpec({SpecMode mode = SpecMode.power, double dbFloor = -120.0}) STFTSpecFrames
Flushes the tail of a streaming run and returns scalar spectrum frames.
maxProcessFrames(int signalLength) int
Conservative frame upper bound for process, including the final flush.
maxPushFrames(int inputLength) int
Conservative frame upper bound for one streaming push call.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
process(Float32List signal) STFTFrames
Processes a whole signal buffer and returns all complex STFT frames.
processSpec(Float32List signal, {SpecMode mode = SpecMode.power, double dbFloor = -120.0}) STFTSpecFrames
Processes a whole signal buffer and returns scalar spectrum frames directly.
push(Float32List input) STFTFrames
Pushes one input chunk and returns any complex STFT frames produced.
pushSpec(Float32List input, {SpecMode mode = SpecMode.power, double dbFloor = -120.0}) STFTSpecFrames
Pushes one input chunk and returns scalar spectrum frames directly.
reset() → void
Clears the streaming state so the next input starts a fresh analysis run.
toString() String
A string representation of this object.
inherited

Operators

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