Skip to main content

cursor_at

Function cursor_at 

Source
pub fn cursor_at(
    track: &[CursorSample],
    frame: Frame,
    smoothing: u32,
) -> Option<(f32, f32)>
Expand description

The smoothed cursor position at project frame, for the ED.19 overlay.

track is assumed sorted by frame (the capture produces it in frame order). Returns None for an empty track; clamps to the first sample for frames before the track starts. smoothing (0..=100) is an exponential moving average over the samples up to frame0 is the raw latest sample, higher values lag more (taming jitter, the way a fluid head tames handheld). Pure arithmetic, exhaustively testable.