Skip to content

fix(bend): GP8 short-bend curve loss + 2D curve timing + 3D bnv gating (Codex follow-ups)#535

Merged
byrongamatos merged 1 commit into
mainfrom
fix/bend-curve-codex-followups
Jun 20, 2026
Merged

fix(bend): GP8 short-bend curve loss + 2D curve timing + 3D bnv gating (Codex follow-ups)#535
byrongamatos merged 1 commit into
mainfrom
fix/bend-curve-codex-followups

Conversation

@byrongamatos

Copy link
Copy Markdown
Contributor

Follow-up to the bend-curve PRs (#531/#532). An independent post-merge Codex review surfaced three correctness edges (no P1s); this fixes them.

Sev PR Finding Fix
P2 #531 GP8 bnv timing used rn.sustain (zeroed for notes ≤0.2s) → short GP8 bends lost bt/bnv (kept scalar bn); GP5 uses raw dur use the beat duration dur (matches GP5)
P2 #532 2D bnvNormalizedPoints mapped x over the curve's [first.t,last.t] not the note span → curves not starting at 0 / ending at sus were time-distorted map over [0, sus] (clamped); curve-span fallback when sus≤0
P3 #532 3D ribbon + chevron gated on bn>0 → a bnv-with-bn==0 note drew no ribbon/marker also fire on bnv presence; chevron steps from max(bn, bnv peak)

The GP5 unit-conversion (the flagged risk) was confirmed correct in review and is untouched.

Review

Codex re-reviewed the fix: clean, no findings (dur is the in-scope note duration; the sus mapping + clamp + fallback are correct and don't affect no-sus callers; the 3D path doesn't double-draw).

Tests

+1 JS case (sus-relative mapping + sus≤0 fallback). JS 8/8; 250 core GP/song tests pass.

NB: the GP8 short-bend path still lacks a dedicated synthetic-GPIF fixture (same gap as the GP8 offset-prop-name P3) — _gpx_bend_shape units cover the function; the fix is the one-line caller change.

Part of #334.

🤖 Generated with Claude Code

Post-merge Codex review of the bend-curve PRs (#531/#532) surfaced edge cases:

- GP8 (#531 P2): bnv timing used rn.sustain, which is zeroed for notes <= 0.2s,
  so short GP8 bends kept the scalar bn but lost bt/bnv. Use the beat duration
  `dur` (matching the GP5 path) so the curve survives.
- 2D highway (#532 P2): bnvNormalizedPoints mapped x over the curve's own t-range
  [first,last] instead of the note span, so curves not starting at 0 / ending at
  sus were time-distorted. Now maps over [0, sus] (clamped), with a curve-span
  fallback when sus<=0 (existing no-sus callers unaffected).
- 3D highway (#532 P3): the sustain ribbon + bend chevron were gated on bn>0, so a
  note carrying an authoritative bnv with bn==0 drew no ribbon/marker. Both now
  also fire on bnv presence; chevron steps derived from max(bn, bnv peak).

Codex-reviewed: clean (no findings). +1 JS test (sus-relative mapping + fallback).
JS 8/8, 250 core GP/song tests pass.

NB: GP8's short-bend path still lacks a dedicated synthetic-GPIF fixture (same gap
as the GP8 offset-prop-names P3) — _gpx_bend_shape units cover the function; the
fix is the one-line caller change.

Part of #334.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@byrongamatos
byrongamatos merged commit a858617 into main Jun 20, 2026
0 of 3 checks passed
@byrongamatos
byrongamatos deleted the fix/bend-curve-codex-followups branch June 20, 2026 22:46
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.

1 participant