Repository navigation
Harden Guitar Hero live note tracking in V8 - #145
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 51cbe85b27
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| cy = int(center[1] * h) | ||
| xhalf = max(5, int(w * self.note_lane_half_width)) | ||
| y0 = max(0, cy - int(h * self.note_lookahead)) | ||
| y1 = max(y0 + 1, cy - int(h * self.note_receptor_exclusion)) |
There was a problem hiding this comment.
Exclude the full receptor from the arrival ROI
When a colored receptor extends more than note_receptor_exclusion above its detected center, this upper bound leaves part of the receptor itself inside the note ROI. With the shipped 480px height, the exclusion is only about 4px; even the test fixture's 11px-radius receptors leave a large colored cap in the ROI whose area exceeds note_min_area, producing a zero/near-zero gap and an arrival strength of 1 with no note present. Consequently the detector can emit an all-five-lane chord and keep every lane disarmed, preventing subsequent real notes from firing; the ROI needs to exclude the receptor's actual contour rather than a fixed 4px strip.
Useful? React with 👍 / 👎.
| if self._locked_centers is None: | ||
| self.lock_support = 0 | ||
| return centers, confidence |
There was a problem hiding this comment.
Gate gameplay output until the receptor lock completes
Before _candidate_streak reaches receptor_lock_frames, this returns the raw centers and confidence unchanged, and analyze() immediately computes arrivals and gameplay confidence from them. With the shipped thresholds, a single frame at the 0.80 lock threshold becomes 0.80 * 0.94 = 0.752, exceeding the 0.64 gameplay threshold, so a transient stage-colored layout can take gameplay ownership and press frets on its first frame despite the stated three-frame agreement requirement. Return non-gameplay confidence/no usable centers until the lock is established.
Useful? React with 👍 / 👎.
Live failure
V7 finally completed the entire boot/setup/menu path and launched a real Guitar Hero song, but the first gameplay attempt failed almost immediately and looked like random button mashing.
The current gameplay detector explains that behavior: it selects each colored fret receptor independently from any same-colored contour in the lower screen, while a live concert stage contains abundant green/red/yellow/blue/orange scenery and lighting. It then fires from a broad color-density strip tens of pixels above the chosen point. A bad receptor pick therefore becomes a stream of false fret presses, and even a good pick can be triggered much too early.
V8 fix
Regression coverage
Synthetic concert-highway tests prove that V8:
Evidence boundary
This addresses the obvious structural cause of the toddler-like first gameplay run. The remaining live variable is the exact GH1 timing window;
note_trigger_gapis intentionally exposed in config and telemetry so the next retained song can tune one meaningful timing parameter instead of guessing across the whole detector.