Repository navigation
upstream (complexlogic): Refactor SungToEnd Logic - #243
Merged
Merged
Conversation
dgruss
marked this pull request as ready for review
October 28, 2026 20:40
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.
Adapt UltraStar-Deluxe#1467 by @complexlogic. Trailing freestyle lyrics now use the actual final lyric line for fading, while scoring completion uses a cached final scored beat.
USCE keeps its assigned-voice handling from #181. Unassigned voices do not block completion; excluded and zero-weight notes do not extend it. Positive freestyle weights still count. The cache is rebuilt after medley trimming, and negative beats and overlapping lines are handled.
The original commit retains its author and message. USCE adaptations are a separate commit by Daniel Gruss.
Native parser regression fixtures pass for freestyle tails, eight voices, scoring weights, no-score tracks, negative beats, overlapping lines and medley exclusions. Actual game playback with an isolated synthetic song confirms completion stays false during the scored note, becomes true while the freestyle tail is still visible, and the tail then fades out. Temporary capture hooks are removed.
Main / PR comparison
Rechecked main
21bd3d5dagainst runtime commit528d33e5with synthetic PCM through the actual pitch detector, normal scoring and separate SQLite databases. Scores were earned by detection, not assigned by the harness.The separate #244 clipping reproduction was also run on both versions: 12-second audio excludes the note and earns zero; 30-second audio retains it and earns 10000. That failure predates this PR.
All 14 runs exited normally. The previously captured freestyle-tail fade is unchanged. Temporary PCM/input hooks are removed; normal executables were rebuilt. These are controlled synthetic-input checks, not a claim of human microphone testing.
Configurable scoring weights
Completion follows the scoring weights from #57. A freestyle note with positive weight counts; a normal note with zero weight does not. Excluded notes stay excluded even when freestyle has positive weight.
14 additional controlled game runs compared main and this PR using actual pitch detection and saved highscores:
The regression test additionally covers every note type at zero and positive weight, mixed scored/unscored notes in the final line, multiple non-scoring final lines, and medley-excluded freestyle with positive weight. All passed. Saved score results matched main in every game case. The additional commit only extends tests; runtime code is unchanged.
Original description