feat(gp): continue tied notes (extend the held note's duration) - #53
Conversation
Replaces build_event_group (one beat -> one EventGroup) with append_beat, which pushes onto the voice's growing group list and threads a VoiceAccum (groups + a per-string held-note map + loss). Behaviour is unchanged — ties are still skipped to loss — but the held map is now populated, ready for the next slice to consume. The dead-note characterization test moves to the new seam.
A NoteType::Tie continues the note on its string, so it must lengthen that note rather than be dropped. The importer still skips ties, so this fails: the tie beat emits a stray rest and the held note keeps its original duration.
NoteType::Tie previously dropped the tied beat to loss, truncating the held note. Now a tie extends the most recent note on its string by the tie beat's duration (extend_tie); an all-tie beat emits no event of its own. Orphan ties (no preceding note on the string) remain a loss. The module loss note is updated.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughRefactors GP beat processing in ChangesGP Tied-Note Beat Processing
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
What
GP import fidelity, slice 2 (S3, ADR-0018): tied notes (
NoteType::Tie) now continue the preceding note on their string instead of being dropped.Before, a tie was skipped to
LossReport, which truncated the held note's duration — a half-note written as two tied quarters imported as a single quarter plus a dropped note. Now the tie extends the most recent note on its string by the tie beat's duration, and an all-tie beat emits no event of its own (the held note carries the sound).How (TDD: refactor → red → green)
refactor— replacebuild_event_group(one beat → one group) withappend_beat, which pushes onto the voice's group list and threads aVoiceAccum(groups + a per-string held-note map + loss). Behaviour unchanged; the dead-note characterization test moves to the new seam.test(red) — a struck note then a tie on the same string must yield one note of the summed duration; fails while ties are skipped (stray rest, original duration).feat(green) —extend_tielengthens the held note; orphan ties (no preceding note on the string) remain a loss. Module loss note updated.Notes
Checks
cargo test --workspacegreen (502 tests; newtied_note_extends_previous_note_duration)cargo clippy --all-targets -- -D warningsclean;gp.rsrustfmt-cleanhttps://claude.ai/code/session_01TTUbGjzD8ysnVnCJnZJE95
Generated by Claude Code
Summary by CodeRabbit