Repository navigation
Piano Roll and Score follow the playhead while playing or recording (fixes #150) - #156
Merged
Merged
Conversation
…issue 150) Both views only scrolled when the user scrolled, so once the playhead left the visible range they stopped showing it. While the transport plays or records, the view now pages when the playhead leaves it (keeping it near the left edge), as Logic's Page follow does. The playhead is followed only while it is inside the region being edited. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #150.
The Piano Roll and the Score only scrolled when the user scrolled. Once the playhead went outside the visible range, nothing brought it back, so the view stopped showing the playhead.
Change: while the transport plays or records, both views page when the playhead leaves the visible range, keeping it near the left edge (Logic's Page follow). Only the playhead inside the region being edited is followed. The rule is a pure function,
piano_roll::follow_scroll, with unit tests for the visible, right-edge, left-edge and non-finite cases.Not done: a UI option to turn follow off, and a test of the drawing code itself. Not checked on Windows 10 with a long imported MIDI file (the reporter's setup); it is the same code path, but it was not run.
🤖 Generated with Claude Code