Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Support for random seeking #52

Open
PoneyClairDeLune opened this issue Aug 2, 2024 · 1 comment
Open

Support for random seeking #52

PoneyClairDeLune opened this issue Aug 2, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request P2 Medium priority (important)

Comments

@PoneyClairDeLune
Copy link
Contributor

Currently, seeking randomly will cause all sorts of desync problems for all visualizers based on RootDisplay (basic.mjs). Skipping backwards will freeze the event feed, until the player head reaches wherever it was before. Skipping forwards mid-play will cause hanging notes at best, total state desync at worst. No matter which direction a skip occurs, it will also induce problems with current position in bars.

Proper support for random seeking should solve this long-standing pain nicely. For a proper implementation, some ideas are drawn below.

  • For the current position, a separate table of offsets could be built. The player then only needs to query for the correct offsets.
  • The simplest solution for supporting seeking backwards would be resetting Octavia entirely, and replay all events from the beginning up to the desired point. This approach is cheap on memory, but not so on CPU, and it doesn't play well with synths at all.
  • A more complex solution would be building out a timed raw state graph beforehand. Whenever a seek happens, the state could be overridden with the queried state from the graph, either by plain events (when possible) or setup SysEx messages. Has an added potential benefit of supporting loops when the middleware gets finished. It plays nicely with synth, and is easy on the CPU, but has an unknown impact on memory usage.
@PoneyClairDeLune PoneyClairDeLune added P2 Medium priority (important) enhancement New feature or request labels Aug 2, 2024
@PoneyClairDeLune
Copy link
Contributor Author

The simpler approach shall land in 0.5.x, along with the time offset graph. The simple seeking support should not be brought to 0.6.x where middleware is planned to receive an overhaul, as it could be disastrous for synths on the receiving end.

@PoneyClairDeLune PoneyClairDeLune self-assigned this Oct 7, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request P2 Medium priority (important)
Projects
None yet
Development

No branches or pull requests

1 participant