BeatDetectionService class abstract interface

Detects the beats of one audio track and emits them as a BeatGrid in absolute video-frame space.

This is the contract Trigger.beat resolves against: the real implementation decodes the track to PCM once before frame 0, runs the in-house spectral-flux onset detector, snaps the onsets to absolute video frames at the render fps, and content-hash caches the grid as JSON. Detection is async (it may spawn ffmpeg to decode), so it runs entirely in the pre-resolve pass — the frame loop only ever queries the resulting immutable grid.

The gate default reads a committed WAV through an in-house decoder (no ffmpeg); the live ffmpeg-decode path is exercised behind the ffmpeg test tag. The analyse-twice→identical-grid property is the determinism proof.

BeatGrid is the queryable result; the real SpectralBeatDetectionService is named in prose because it lives in a layer above core.

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

detect(AudioSource source, {required int fps, required int totalFrames}) Future<BeatGrid>
Detects source's beats and returns them as a BeatGrid over a video of totalFrames frames at fps.
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