fix(core): GPIF imports keep tapping and hammer-on origin semantics - #201
Merged
Merged
Conversation
…ntics Two losses in the guitarpro 0.4.2 GPIF conversion, measured on a 410-file Guitar Pro corpus: - the Tapped note property is never read (the beat's tap effect is left a placeholder): 31 of 145 GPIF files carry tapping (1,006 Tapped note definitions) and none of it reached griff; - HopoOrigin and HopoDestination both set the one legacy hammer flag. GP3/4/5 set it on the origin note only and griff's HammerOn span follows that note; on GPIF input the destination got a span too, so adjacent independent pairs read as one chain. On the corpus, "same string" across derived hammer-on / pull-off edges is ~98% for GP3-5 but 79-85% for GP6-7. Five failing tests over authored GPIF text packed with the crate's public writer: only the origin carries the hammer span; a chain marks every origin but not the last destination; two adjacent pairs stay two pairs; a tapped note imports as a tap; a tapped chord note taps its beat (the legacy model's per-beat tapping, as for GP3/4/5). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The adapter already reads the GPIF document itself (#198); it now also restores two note techniques the guitarpro 0.4.2 conversion drops or merges, walking the document exactly as the crate walks it (each track's bar per master bar, voice slots skipping -1, existing beats and notes in order) and zipping it with the converted song: - Tapped: a beat with a tapped note gets the legacy beat-level SlapEffect::Tapping — how GP3/4/5 store tapping — so its notes become NoteMark::Tap through the existing path; - HopoOrigin / HopoDestination: the legacy hammer flag is reset to HopoOrigin alone, the GP3/4/5 meaning ("legato to the next note on this string"), so a destination no longer carries a HammerOn span of its own. A voice whose converted beats or notes do not line up with the document is left as converted and reported in the loss report, never re-labelled out of step. Measured on the 410-file corpus, GP6/GP7 files (145): - files with tapped notes 0 -> 28, tapped notes 0 -> 2,013; - HammerOn spans on single notes 18,284 -> 10,906 (7,378 destination-only spans gone); the next single note is on the same string 76.8% -> 99.7%, in line with GP3-5's 99.1%; - voices left unrestored: 0. GP3/4/5 imports are unchanged (same tap and span counts). cargo test --workspace green (1,697 tests; missing_file_golden skipped locally only, as before); clippy -D warnings and fmt clean for griff-core. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
PhysShell
pushed a commit
that referenced
this pull request
Sep 17, 2026
#201 imports GP6/7 tapping. Rerun on this PR's lab code merged locally with main: the slice grows from 155 to 242 lines, and the length-matched baseline had contained that unlabelled tapping (1.26 -> 1.17 excess per note for the original lines). Hand attribution closes most, not all, of the slice's excess (94% on the original lines against the corrected pool, 66% on the added GP6/7 lines against their format, 78% overall); exactness stays out of reach in both formats. The remaining excess concentrates in one-string tapping figures with open-string pull-offs. Stage 2 starts from this re-measured baseline, per format and with a per-song concentration check. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
PhysShell
pushed a commit
that referenced
this pull request
Sep 17, 2026
Brings #201 (GPIF techniques), #202 (tuplet durations), #203 (corpus source binding) and #204 (Generator Observatory) into the optimality-gap branch. The only conflict was docs/decisions.log.md, where both sides appended entries. Resolved in date order: this branch's 2026-09-16 entry comes first, then main's 2026-09-17 entries. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
PhysShell
pushed a commit
that referenced
this pull request
Sep 17, 2026
…tie-break Brings in the optimality-gap branch, which now includes main at e871a44 (#201, #202, #203, #204) and its re-measurement after #202. The only conflict was docs/decisions.log.md, and every entry involved is dated 2026-09-17. main's entries come first and this branch's tie-break entry comes after them, so once #197 lands this branch's decision-log diff is a single append. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
PhysShell
pushed a commit
that referenced
this pull request
Sep 17, 2026
…ue-aware Brings in the tie-break branch, which now contains main at e871a44 (#201, #202, #203, #204) and the post-#202 re-measurements of #197 and #199. Merged without conflicts. The decision log ends with main's entries, then the tie-break entry, then this branch's tap-attribution entry. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
PhysShell
pushed a commit
that referenced
this pull request
Sep 17, 2026
This branch now contains #202, so the tap-attribution audit gains a "Re-measurement after #202" section and a pointer in its header. The numbers are from `fingering_gap taps`, rerun on this branch merged with main at e871a44, with the same weights. - Slice: 242 → 226 lines, 25,571 notes (5,260 tapped). - Untapped pool: 8,803 → 8,740 lines. Control: 0 of 8,740 differ. - `v1-fit`, whole corpus, format (human path in optimum set / excess per note / agreement): - tap-blind: 0.0% / 3.20 / 38.5%; - tap-aware: 0.9% / 1.63 / 43.1%; - length-matched baseline: 20.0% / 1.16 / 44.9%. - Share of the excess gap closed: 78% → 77%. The subset split, the format-matched baselines, the concentration check and the residual decomposition came from a local dump keyed to the pre-#202 lines. They were not re-run and are marked as such. The decision-log entry still read "parity" from before #201. It now carries the revised reading: most of the excess gap is closed, not all, and exactness stays out of reach. The slice numbers reproduce the impact sweep recorded before the legato census, figure for figure. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
What
GPIF imports (GP6
.gpx, GP7/8.gp) now keep tapping and read hammer-on/pull-off with GP3/4/5 semantics. Both were lost in theguitarpro0.4.2 GPIF conversion:Tappednote propertySlapEffect::Tapping(how GP3/4/5 store it) → notes markedNoteMark::TapHopoOrigin/HopoDestinationhammerflag → the destination note carried its ownHammerOnspanHopoOriginonly — "legato to the next note on this string", as in GP3/4/5How
As with the tuning fix (#198), the adapter reads the GPIF document itself and repairs the converted song at the import boundary. It walks the document exactly as the crate does and zips it with the converted song: each track's bar per master bar, voice slots skipping
-1, then existing beats and notes in order. A voice whose converted beats or notes do not line up is left as converted and reported in theLossReport, never re-labelled out of step.Measured on a 410-file Guitar Pro corpus (145 GPIF files)
HammerOnspans on single notesGP3/4/5 imports are unchanged (identical tap and span counts; 99.1% same-string).
Tests
b9c037b), then green (89f3bde).core/tests/gp_gpif_techniques.rs: authored GPIF text (no copyrighted tab) packed with the crate's public writer. It covers:cargo test --workspacegreen locally (1,697 tests;missing_file_goldenskipped locally only — its golden holds the English OS error text),cargo clippy -p griff-core --all-targets -- -D warningsandcargo fmt --checkclean.Out of scope / notes
HammerOnspan, as before. Deriving it changes corpus technique tags for every format and is a separate decision.LeftHandTapped(45 note definitions in the corpus) is not mapped.slundi/scorelibmaster. That covers these two and the staff-tuning fallback worked around in fix(core): GPIF imports use string 1 = highest and read staff tunings #198. A git dependency on a fork is ruled out bydeny.toml; the fix will be offered upstream, and griff drops these workarounds once a release carries it.🤖 Generated with Claude Code