Skip to content

Mark recordings on the live graph with their exact window - #1122

Open
microbit-matt-hillsdon wants to merge 1 commit into
mainfrom
recording-window
Open

microbit-matt-hillsdon wants to merge 1 commit into
mainfrom
recording-window

Conversation

@microbit-matt-hillsdon

Copy link
Copy Markdown

The graph marked recordings when the store's isRecording flag changed, via a React effect. The end was particularly late: it waited for the recording timer and the storage write in onDone.

The recording data source now publishes the window of samples it captures, start and end, when recording starts, and the graph draws the band from that. It's cut short only if recording is cancelled.

Sample timestamps move from Date.now() to performance.now(), and the graph takes its samples from BufferedData rather than its own listener, so the band and the line share a clock and the same timestamps.

The graph marked recordings when the store's isRecording flag changed,
via a React effect. The end was particularly late: it waited for the
recording timer and the storage write in onDone.

The recording data source now publishes the window of samples it
captures, start and end, when recording starts, and the graph draws the
band from that. It's cut short only if recording is cancelled.

Sample timestamps move from Date.now() to performance.now(), and the
graph takes its samples from BufferedData rather than its own listener,
so the band and the line share a clock and the same timestamps.
@github-actions

github-actions Bot commented Dec 3, 2026

Copy link
Copy Markdown

Preview build will be at
https://review-createai.microbit.org/recording-window/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant