Skip to content

Conversation

emuell
Copy link
Member

@emuell emuell commented Oct 13, 2025

When exchanging a player's sequence (a single pattern in the playground), run the previously played back sequence for a full time unit's step to apply note stops only. If there are still playing notes after the previous sequence has been played back, stop them forcefully.

fixes #89

@unlessgames could you quicky check if you can still replicate this?

Will merge #87 afterwards, as both have changes in player.rs which may conflict.

- when preparing a new script (sequence) for playback, pass the previously played sequence along
- run the previously played sequence a full step to apply note offs only, shutting down still playing notes
- remaining playing notes which did not stop within a bar in the old sequence get stopped immediately
`Continue` mode may still be useful in some rare cases, but definitely should not be the default action.
@emuell emuell force-pushed the fix/hanging-notes-on-live-edits branch from 93fc84b to bfe31c2 Compare October 13, 2025 06:44
Copy link

Benchmark for d375f86

Click to view benchmark
Test Base PR %
Cycle/Generate 48.1±0.45µs 47.9±0.35µs -0.42%
Cycle/Parse 379.0±6.49µs 371.6±3.07µs -1.95%
Rust Phrase/Clone 422.0±9.99ns 423.0±3.50ns +0.24%
Rust Phrase/Create 76.5±1.16µs 75.6±0.89µs -1.18%
Rust Phrase/Run 666.6±1.85µs 660.6±2.30µs -0.90%
Rust Phrase/Seek 144.5±268.04µs 136.2±251.77µs -5.74%
Scripted Phrase/Clone 682.2±9.71ns 660.1±6.96ns -3.24%
Scripted Phrase/Create 974.7±10.62µs 984.1±11.32µs +0.96%
Scripted Phrase/Run 1696.0±12.38µs 1702.8±9.34µs +0.40%
Scripted Phrase/Seek 221.1±448.55µs 221.0±448.25µs -0.05%

@unlessgames
Copy link
Collaborator

I cannot replicate it anymore.

@emuell emuell merged commit 3862cda into dev Oct 14, 2025
2 checks passed
@emuell emuell deleted the fix/hanging-notes-on-live-edits branch October 14, 2025 08:00
@emuell emuell mentioned this pull request Oct 14, 2025
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.

2 participants