feat(editor): scale-degree overlay on fretted notes (in-key highlight) - #131
Conversation
DAW roadmap 4.16a (the guitar-lane scale-degree tint; the D4 tuning→pitch resolver it needed is _soundingPitchPure, shipped in #115). With the in-key highlight active, each String-view note shows a small degree label in its top-right, coloured by role. - @pure:scale-degree: _scaleDegreeSemisPure / _scaleDegreeLabelPure give the degree relative to the tonic (0=root, flats for the chromatics: 1 ♭2 2 ♭3 3 4 ♭5 5 ♯5 6 ♭7 7); _scaleDegreeColorPure is a chord-tone-leaning palette (root gold, 3rds sky, 5th green, 7ths violet, others neutral) so the 1/3/5/7 skeleton pops against passing tones. - _drawNote: hoists the sounding pitch it already computes for the in-key shading (degMidi) and, when ghl is present, draws the degree label top-right — out-of-key notes dimmed, unresolvable pitches skipped. Only renders while the highlight is on; keys view and the piano roll are untouched. Display-only — no edit, no change to the authored `sd` teaching mark. Tests: tests/scale_degree.test.js (6) — degree wrap both directions, the full chromatic label row, a real A-major key, non-finite guard, and the role palette (distinct 1/3/5/7, shared min/maj 3rd + 7th, neutral passing tones). All fail on main. Full JS suite green. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HzMBtxWnLGHYkMMXtK38Bg
|
Warning Review limit reached
Next review available in: 30 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis PR adds a scale-degree overlay for fretted notes in ChangesScale-degree overlay feature
Estimated code review effort: 2 (Simple) | ~15 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Fix chromatic degree label at semitone 8: ♯5 -> ♭6 to honour the documented flat/Nashville convention shared by ♭2/♭3/♭5/♭7. Add a regression test asserting no chromatic label uses a sharp. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
@coderabbitai review |
✅ Action performedReview finished.
|
…ree-tint # Conflicts: # CHANGELOG.md
DAW roadmap 4.16a — the guitar-lane scale-degree tint. Its prerequisite (the D4 tuning→pitch resolver,
_soundingPitchPure) shipped in #115. Editor-only.What
With the in-key highlight active, each note in String view now shows a small scale-degree label in its top-right corner —
1,♭3,5,♭7, … relative to the current key — coloured by role so the 1/3/5/7 harmonic skeleton pops:Out-of-key notes still show their chromatic degree, dimmed, so a fretted line reads as scale degrees at a glance. Capo- and tuning-aware (it reuses the exact sounding pitch the in-key shading already computes). Shown only while the highlight is on; skipped for any note whose pitch can't be resolved. Display-only — it never edits the chart or the authored
sdteaching mark, and the keys view / piano roll are untouched.Implementation
@pure:scale-degree:_scaleDegreeSemisPure/_scaleDegreeLabelPure(degree relative to the tonic, flats for the chromatics) +_scaleDegreeColorPure(the role palette)._drawNote: hoists the sounding pitch (degMidi) it already resolves for the in-key shading, then draws the degree label top-right whenghlis present. Zero extra per-note arrangement work.Tests —
tests/scale_degree.test.js(6, all fail on main)Degree wrap in both directions, the full chromatic label row, a real A-major key (A=1, E=5, C#=3, G#=7), the non-finite guard, and the role palette (distinct 1/3/5/7, shared min/maj 3rd and 7th colours, neutral passing tones). Full JS suite green.
Scope / fresh region
New
@pure:scale-degreeblock by@pure:scale, plus the overlay in_drawNote(the String-view note render) — a region no open PR touches (#126's roll work was in_drawPianoNote). No core, no spec.Summary by CodeRabbit
New Features
Tests