Skip to content

Commit 2d92d0d

Browse files
authored
Merge pull request #208 from PhysShell/claude/lab-legato-projection-audit
lab: classify cross-line legato boundaries
2 parents 08cdc2d + dad53c6 commit 2d92d0d

7 files changed

Lines changed: 1327 additions & 48 deletions

File tree

‎docs/audit/2026-09-fingering-legato-continuity.md‎

Lines changed: 88 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,69 @@ rests on few songs.
446446
30 tapped lines, reported, not interpreted. `v1-fit` exactness: B 6.7%,
447447
C1 16.7%, D1 26.7%, C2(3) 13.3%, D2 13.3%.
448448

449+
### Projection forensic tail (post-fix)
450+
451+
`legato-census` now writes three diagnostic-only artifacts under `--out`:
452+
`legato-cross-line.jsonl` (all relations whose resolved target is outside the
453+
origin line), `legato-longest-within-line.jsonl` (the deterministic top 50 by
454+
exact quarter-note gap), and `legato-span-census.json` (nearest-rank
455+
distributions overall and by kind, derived direction, origin/target tap state,
456+
and open target). Ratios are reduced integers rather than floats. Licensed
457+
corpus records are not committed. The census fails closed if the cross-line
458+
manifest count differs from the importer's count.
459+
460+
Full-corpus rerun (410 files) answers the boundary question more narrowly than
461+
the old gap-only manifest could:
462+
463+
- **46 / 46 cross-line relations** were emitted, from 44 origin lines and 15
464+
songs. The first boundary includes `chord_onset` in 45 cases and `rest_cut`
465+
in 5 (causes can coincide): 41 are chord-only, 4 rest-plus-chord, and only 1
466+
is a pure rest cut. Across every crossed boundary location, the counts are
467+
333 chord and 7 rest; none is caused by unpositioned input, maximum fret, or
468+
pitch mismatch.
469+
- **38 targets are themselves excluded chord-onset atoms.** They do not belong
470+
to any monophonic `TabLine`; this, rather than an ordinary handoff to the
471+
next line, explains most of the 46. The other 8 targets are in kept lines:
472+
6 in the immediately next kept line and 2 much farther away. Those two span
473+
64.375 quarters / 16 boundary locations / 15 intervening kept fragments
474+
(`Blue Dream`) and 182.496875 quarters / 27 locations / 3 kept plus 2 dropped
475+
fragments (`Have A Great Life`). No target is in a dropped short fragment.
476+
- Most cross-line gaps are nevertheless local in time: 30/46 are at most 1/2
477+
quarter and 31/46 at most one quarter. The exact quarter-gap distribution is
478+
min 1/8, median 1/2, p90 27.5, p95 75, p99/max 182.496875. Thirty-six cases
479+
cross one boundary; boundary-count median is 1, p90 16, p95 38, p99/max 155.
480+
- The **29,758 retained within-line relations** are overwhelmingly ordinary:
481+
note-distance min/median/p90/p95/p99 is 1 (max 169), intervening-onset and
482+
note-atom min/median/p90/p95/p99 is 0 (max 168), and exact quarter-gap is
483+
min 1/8, median 1/4, p90/p95/p99 1/2, max 212/3. Only 110 relations (0.37%)
484+
are non-adjacent.
485+
- The top 50 starts at 2.25 quarters and covers 10 songs. Fourteen relations
486+
exceed 8 quarters and three exceed 32. The extremes are 70.667 and 57.5
487+
quarters in `Say Hi`, 39 in `Missed Injections`, 26.5 in `There's No Dust
488+
in the City`, and a repeated 23.5-quarter pair in `Frozen One`. Sixteen
489+
repeated 2.5-quarter figures in `Son of Robot` and six repeated
490+
10.167-quarter figures in `Say Hi` show that a long relation can be a stable
491+
phrase pattern, while the isolated extreme spans are consistent with stale
492+
or overextended source flags. That last classification is heuristic, not a
493+
correction rule or ground truth.
494+
495+
The evidence therefore separates two architectural questions. Some imported
496+
technique relations do survive an optimization-line boundary, but only 8 of
497+
the 46 have targets representable in another kept line, and only 6 reach the
498+
next one. The dominant 38 are instead chord targets missing from the
499+
monophonic representation. Together with #199's `anchor_fret` result this is
500+
convergent, hypothesis-generating evidence that both hand position and some
501+
technique context can outlive a line. It does **not** establish that production
502+
must carry technique boundary state.
503+
504+
A falsifiable next experiment should keep the strata separate: first expose
505+
the 38 chord targets to evaluation without joining lines or changing the
506+
objective, then replay only the 8 kept-target relations with an exact observed
507+
origin-string boundary state and compare against independent-line inference.
508+
If neither changes feasibility or the registered metrics on its predeclared
509+
cases, the boundary-state hypothesis is rejected. No threshold or category
510+
from this audit enters projection or optimization.
511+
449512
## Reading
450513

451514
1. **Observed legato continuity explains a large, robust part of the
@@ -484,20 +547,33 @@ C1 16.7%, D1 26.7%, C2(3) 13.3%, D2 13.3%.
484547
MIDI-sourced lines carry neither, so these gains assume the labels.
485548
- **Import limits.** Legato is imported as an origin only, and D's direction
486549
is derived from pitch.
487-
- **Line slicing.** 46 resolved targets lie outside their origin's kept line.
488-
They are counted explicitly but cannot enter a line-local objective.
550+
- **Line slicing.** 46 resolved targets lie outside their origin's kept line:
551+
38 are excluded chord atoms and only 8 are in another kept line. They are
552+
counted and emitted explicitly but cannot enter a line-local objective.
489553
- **Weights.** `v1-fit` was fitted on all lines and reused unchanged. `k` and
490554
the waiver were fixed before the results.
491555
- **Concentration.** The C1 → D1 gain rests on 3 songs.
492556
- **Holdout.** The holdout slice (30 lines) is too small to interpret.
493557

494-
## Follow-ups proposed (not done)
495-
496-
1. **Hidden technique inference must predict legato edges, not only taps.**
497-
Continuity carries half of the exactness effect, so a MIDI-side model
498-
without legato labels would lose it.
499-
2. **Inspect the 46 cross-line relations and the longest within-line spans.**
500-
They are the remaining forensic set for distinguishing ordinary voice
501-
interleaving from suspicious transcription or import cases.
502-
3. **Hammer-on / pull-off direction.** D's derived direction argues for the
503-
separate core decision on importing or deriving direction for all formats.
558+
## Stage status and next targets
559+
560+
Stage 2 is frozen after the semantic repair, independent remeasurement, and
561+
the projection forensic tail:
562+
563+
- **C1:** robust corpus evidence for hard continuity when an observed legato
564+
relation is available.
565+
- **D1:** promising conditional evidence, not a canonical objective rule; its
566+
gain is concentrated and direction is derived from pitch.
567+
- **No C3/C4 tuning:** the remaining tail does not justify another ladder of
568+
penalties or exceptions.
569+
570+
Before changing production, the next boundary experiment should test the two
571+
predeclared strata above independently: chord-target visibility (38 cases) and
572+
observed state replay between kept lines (8 cases). The next large Constraint
573+
Lab target remains **chord voicing**, extending the guitar-specific structural
574+
work from monophonic paths to hand shapes. **Hidden technique inference**
575+
remains the next bridge to MIDI: predict taps and legato relations from pitches,
576+
timing, and context, then score both label quality and downstream fingering
577+
regret against this supervised oracle.
578+
Importing or deriving hammer-on / pull-off direction remains a separate core
579+
decision.

0 commit comments

Comments
 (0)