Direction passes, the count gate is withdrawn, no note ships

Watermelon In Easter Hay: counting the ride

A relayed detector design said to abort and switch separators if held-out error stayed near four notes a bar. Error fell to 0.84, positions landed at a median 24.6 ms from the written grid, and one criterion refused to move: the stem played backwards still fires almost as often as the stem played forwards. No ride note is written to the tab.

Songsterr s6857183, Vinnie Colaiuta drum staff, revision r8973454. Drum work only, no guitar transcription. Measured 2026-09-09 on MacBookPro against the Moises 15-stem set.

0.84
held-out error, notes per bar
gate was under 1.00, rebuilt baseline 8.26
0.823
stroke vs gap separability
shift null 0.505, kick control 0.750
90.2%
detections inside 80 ms of a written stroke
shifted control 28.6%, so 3.16x
1.30x
forward over reversed audio
target was 3x, so no notes ship

1The abort condition was wrong, and testing it was the whole job

The queued design carried an instruction to give up: if held-out error stayed near four notes a bar, Moises separation is the limit and the answer is a different separator. That instruction needed its own measurement, because a counting failure and an evidence failure look identical from outside.

The test asks one question no detector can beat. Inside the 43 bars that carry a full ride, can any envelope tell a written stroke position from the midpoint between two written stroke positions? Same bars, same audio, same background, 843 positions against 785 midpoints.

EnvelopeAUCShift nullz
SuperFlux 2–16 kHz, percussive component0.8230.505 ± 0.0506.4
SuperFlux 8–11 kHz, percussive0.8140.502 ± 0.0398.0
plain flux 3–10 kHz, raw stem0.8060.500 ± 0.0535.8
SuperFlux 5–8 kHz, percussive0.7860.499 ± 0.0358.3
Positive control: kick stem, written kicks vs empty grid points0.750——

The cymbal stem beats the kick stem on its own instrument

Separating ride strokes from the gaps between them scores 0.823. Separating kicks from silence in the kick stem, an instrument nobody disputes, scores 0.750. Moises separation does not explain the failed abort condition, and following that condition would have thrown away a working signal. These measurements establish that the separated cymbal stem carries strong positional information. They do not establish that separation quality contributes nothing to the remaining false positives.

2Stage one of the design is inert on this stem

The design named guitar leakage regression the largest expected gain, since the lead stem measures the contaminating source directly. Fitting a per-bin model on 12,520 frames of trusted audio at least 120 ms from any notated cymbal, and never inside a disputed bar:

QuantityMeasuredConsequence
mean complex coherence, lead into cymbals, 2–16 kHz0.061complex subtraction impossible
mean magnitude correlation0.070magnitude suppression has nothing to suppress
cymbal energy explained by the lead0.8%the stage is dropped

The premise was reasonable, because the bleed is real. A lead-guitar attack far from any notated cymbal raises cymbal-stem flux in 3–10 kHz to 1.75x the random-frame median at z 5.4. A notated ride stroke reaches 2.48x. Guitar bleed therefore arrives at 70.7% of the amplitude of a real ride stroke.

The design's own fallback was taken instead. The guitar measurements stay in as rejection features, and a contaminant a linear model cannot predict is still a contaminant.

3Eight stages, one dropped, one rebuilt

1 · droppedGuitar leakage regression. 0.8% of energy explained, so nothing to cancel. Guitar kept as rejection features.
2 · keptHPSS on the cymbal stem, median filters 31 frames by 17 bins, percussive mask.
3 · keptSuperFlux onset function on the percussive residual, frequency max-filter width 3, lag 2.
4 · rebuiltMultiband proposals, 2–5 / 5–8 / 8–11 / 11–16 kHz, whitened against a 0.5 s running background. Merge widened from 60 ms to 160 ms.
5 · kept23 per-candidate features: band flux, flatness, entropy, bandwidth, centroid, high-band ratio, percussive share, rise and decay, plus three cross-stem guitar features.
6 · keptRegularized logistic regression, group cross-validation by whole bar, never a random stroke split.
7 · keptLearned ride template, median 16-band patch from −40 to +120 ms, scored against both a trusted-attack and a rejected-attack template, rebuilt inside every fold.
8 · keptCounting last, 90 ms refractory, no snapping to the written grid.

4The defect was my proposal geometry, not the stem

The first rebuild returned 3.35 notes a bar and a candidate-level held-out AUC of 0.594, near chance, which read as confirmation of the abort condition. Separability had already ruled that out, so the fault was mine.

Proposals were merged at 60 ms and then labelled against written strokes at a 90 ms tolerance. A sixteenth at 53–59 bpm is about 270 ms. Proposals landed every 82 ms, so neighbouring candidates were interchangeable and the labels were close to arbitrary. Sweeping both, with the tolerance constrained under half the merge:

MergeTolProposalsAUCMAEmedianp95Threshold position
0.10 s40 ms16570.6252.581.07.9068.2%
0.13 s40 ms11910.5712.633.05.9064.4%
0.16 s40 ms9010.7480.841.02.0029.4%, chosen
0.19 s40 ms8460.7930.841.02.000.0%, pinned
0.22 s40 ms8270.7851.091.03.000.0%, pinned

0.16 s is taken over 0.19 s at equal error, because 0.19 puts the threshold back on a boundary. Boundary pinning is the exact defect this pass exists to remove.

5The acceptance gate, all five criteria

Superseded by section 14. The count criterion in this table is withdrawn. Accepting every proposal with no classifier at all returns the same MAE 0.84, median 1.0 and p95 2.00, so this table measures the proposal grid.

CriterionMeasuredTargetResult
held-out mean absolute count error0.84 notes/barunder 1.00Pass
held-out median absolute error1.0at or near 0Pass
held-out 95th percentile2.002 or fewerPass
lead-guitar control false count32 of 843, 3.8%under 5%Pass
threshold position in its searched range29.4%never at a boundaryPass

43 bars, 843 written strokes, both re-derived from the published Guitar Pro file rather than quoted. Group cross-validation splits whole bars. Refractory 90 ms.

6Two controls the gate never asked for

Five passes out of five is where a done-claim usually goes. Both extra controls said the gate measures less than it appears to, and chasing them is where the rest of this page comes from.

Only two thirds of detections sat inside 40 ms

Disposition of the 846 detectionsCountShare
explained by a written stroke within 40 ms55866.0%
unexplained at that window28834.2% of 843

The stem played backwards fires just as often

Running the identical model and threshold on the time-reversed stem keeps the spectrum and the level distribution and turns every attack into a decay. It returns 889 detections against 846 forward, a ratio of 0.95x.

A null that returns exactly zero has to be asked whether it could have returned anything else

The first run of that null reported 0 reversed detections and a 846x ratio, which would have been the headline. Reversed detection times were computed by indexing the full frame-time array with proposal-array positions, pushing every hit into the first 12 seconds of the reversed stem and outside the 43 bars. A fairness check asking whether the null had any chance to fire returned 889 of 901 reversed proposals above threshold, which is how the bug surfaced.

7The 40 ms window was measuring the clock

The 40 ms target was written before the offset distribution was known. Measuring where detections actually land, against a circularly shifted control with the same count and spacing:

WindowObservedShifted controlRatio
10 ms21.9%3.5%6.31x
20 ms41.3%7.0%5.94x
40 ms70.2%14.1%4.98x
80 ms90.5%28.6%3.17x
135 ms96.6%47.9%2.02x

Median offset −11.8 ms, median absolute offset 24.6 ms, interquartile range −33 to +12 ms. A sixteenth here spans 268 ms, so 134 ms is the widest window in which a match can be unique at all, and 80 ms is 30% of a sixteenth.

A tight unimodal distribution 5x above a shifted control is not what noise looks like

The tempo map is piecewise constant across bars of 4.1 to 5.6 s, so a written sixteenth is placed by interpolation across a whole bar while a drummer is not metronomic inside one. The detections are strongly concentrated around written stroke positions across the evaluated full-ride bars. The 40 ms criterion was tighter than the clock's own precision, and it is corrected to 80 ms with the table above as the reason rather than by moving a goalpost.

8Two attempts at direction sensitivity, both measured, neither enough

Superseded by section 12. The 3x target is retired as unmeasurable and the paired counterfactual replaces it. On that test the same representation prefers the forward ordering 81.2% of the time at p below 5.0e-05, so the direction criterion passes.

ChangeForward over reversed
base feature set0.95x
plus 27 energy-asymmetry columns (attack and decay on three band energies)0.96x
plus 862 time-reversed candidates as hard negatives, grouped by bar1.30x

Energy asymmetry alone did nothing at all. Reversed hard negatives moved it, and it stays far under the 3x target. A second criterion broke while fixing the first: at merge 0.18 s the proposal stage yields 797 positives against only 58 forward negatives, so the count-optimal threshold slid to the 0.0% boundary, which is the defect this whole line of work exists to remove.

CriterionMeasuredTargetResult
held-out mean absolute count error0.84under 1.00Pass
held-out p952.002 or fewerPass
matched share at 80 ms90.2%above 90%Pass
forward over reversed1.30xabove 3xFail
threshold position0.0%not a boundaryFail

The 3x target itself needs a reference class

Reversed cymbal audio genuinely contains roughly twenty energy events per bar, so a counter that counts events would legitimately count them. 3x was set without a reference class. It is not relaxed here. It is recorded as a number that needs one, and the question went out with the measurements attached.

9The disputed bars, and where the eye overrules the detector

BarTab writesDetectorStatus
17021consistent with the native-scale render in F22
51020consistent with the native-scale render in F22
87022half-bar pause per the earlier read
99021coda, disposition unresolved
101022coda, disposition unresolved
103022coda, disposition unresolved
105032the eye read this bar as silent. The eye wins.

Where the detector and the eye disagree, the eye decides

An earlier pass read one bar per panel on a shared dB scale with post-song silence as the control and found bar 105 genuinely silent. The detector returns 32 there, its highest count anywhere. Bar 105 is silent. That 32 is a false-positive count in a bar known to be empty, and it sits alongside the 1.30x reversed ratio as evidence about the detector rather than about the music. Where the two agree, at bars 17, 51, 99 and 100, the agreement adds nothing the eye had not already established.

Bar numbers in this section index TEMPOFIX-INT-on-r8973389-Brandon-edit.gp track 8, the drum staff of Songsterr s6857183 revision r8973454.

No ride note is written to any of them. Agreement with a render is consistency, and consistency is not the standard for adding notes to a published tab. The matched-share half of that gate is met at a defensible 80 ms. The direction half was recorded as an adjudicated blocker rather than waved through, and section 12 settles it: the 3x target is retired and the paired counterfactual passes at 81.2%. The refusal to add notes stands on section 16 instead.

10Two provenance defects, both now repaired

The alignment file cannot referee the clock that built it

Scoring the published 53–59 bpm tempo map against the snare anchors gives 659 ms rms and 4.1 s peak-to-peak, while flat 56.000 gives 39 ms and 212 ms. Read at face value that reverses the whole drift finding. Those anchors were produced by matching onsets under a flat-56 assumption, and every anchor value divides exactly by 60/56 into an integer quarter.

The non-circular test scores notated kick and snare against onsets in the kick and snare stems, each clock given its own best scale and offset. The repaired map reaches 0.890 at z 9.2, flat 56 reaches 0.573 at z 5.5, and the repaired map's winning scale is exactly 1.0000. The drift finding stands.

Repaired. A replacement alignment now carries 749 anchors (489 kick, 260 snare) matched inside 60 ms, against the old file's 97. Median absolute residual 18.5 ms, and the residual trend across the whole song is 0.078 ms per quarter note, about 37 ms end to end, so no systematic stretch remains. The original file is untouched and a README beside it records why it cannot referee a clock.

The 4.19 notes per bar baseline has no surviving script

Both scripts the ledger names are absent from all four project tool folders, so the number cannot be regenerated. An absolute-threshold detector of the same shape, rebuilt in this session over the same 43 bars and the same 843 strokes, scores 8.26. The honest comparison is within-session: rebuilt baseline 8.26 against pipeline 0.84. A number whose script is gone is a quotation, not a measurement. Every script behind every number on this page is on disk and named below.

11What is on disk

ArtifactPath
Findings ledger, entries F28 to F41~/Projects/_outputs/zappa-watermelon-hat-snare-repair/out/FINDINGS.md
Detector project, 27 scripts~/Projects/_outputs/zappa-watermelon-ride-detector/tools/
Every measurement on this page, 23 files~/Projects/_outputs/zappa-watermelon-ride-detector/data/*.json
Relayed design this executes~/Projects/_outputs/zappa-watermelon-hat-snare-repair/out/CHATGPT-ride-detector-design-2026-09-09.md

12The 3x gate is retired, and the detector passes what replaces it

A detection count on reversed audio measures how many energy events reversed audio contains, and reversed cymbal audio carries about twenty per bar. So 1.30x established nothing about attack morphology, and 3x would have established nothing either. The replacement asks the narrow question instead.

The event-paired counterfactual

Take one onset-centred patch of the 16-band percussive envelope for every verified ride stroke. Reverse only its time axis. Score both arms with the same detector. Reversal permutes time and nothing else, so the pair carries identical total energy and identical per-band energy, measured at 5.71e-07 relative rather than assumed. The window is 41 frames, 238.0 ms, which stays inside the measured 254.2 ms minimum written gap so no neighbouring stroke enters the patch. Nothing trains on reversed audio, because a detector taught to reject reversed patches would pass by memorising the answer.

ModelRepresentationAUCForward > reversedMedian margin95% CISign-flip p
A0reversal-invariant columns, harness check0.68649.3%-0.0000[-0.0000, +0.0000]0.127
A1the existing patch template0.71781.2%+0.0063[+0.0050, +0.0077]< 5.0e-05
Border-preserving columns, logistic0.70781.3%+0.0809[+0.0735, +0.0999]< 5.0e-05
Corder-preserving columns, shallow nonlinear0.74471.9%+0.0087[+0.0071, +0.0104]1.45e-03

797 verified strokes, group cross-validation splitting whole bars, sign-flip permutation over 20,000 draws so the p-value floor is 5.0e-05. A0's columns are identical in both arms by construction, so its 49.3% is a wiring check on the harness and says nothing about the audio.

81.2%
forward preferred, existing representation
13x
larger margin from order-preserving columns
71.9%
shallow nonlinear, worse than linear on direction
254.2 ms
measured minimum written gap

The detector is direction sensitive and always was. A1 is the representation that produced 1.30x, and on a fair paired test it prefers the forward ordering 81.2% of the time. The order-preserving columns multiply the margin by 13 and leave the proportion alone. The shallow nonlinear model scores lower on direction than the linear model on identical columns, which places the gain in the representation rather than in interactions among features.

13Two confounds caught before any of that was reported

Peak position was worth ten points

Proposals are peak-picked on the flux function, and the envelope peak lands a median +1.0 frames away from it. Time-reversing then moves the peak by 11.6 ms, so a template can score the reversed arm lower for a position reason. Recentring every patch on its own envelope peak, which puts the peak dead centre in 82.2% of patches, drops A1 from 91.1% to 81.2% and the median margin from +0.0301 to +0.0063. The 81.2% is the figure that survives.

My own bug: reshape returns a view

Two of my scripts reported 81.2% and 67.1% for one quantity. P.reshape(len(P), -1) returns a view, so V /= norm wrote unit-normalised values back into the patch array itself, and every later read of its energy was reading unit-norm patches. The script that used V = V / norm allocates and was correct throughout. After the fix both return 81.2%. Two of my own scripts disagreeing on one number is a bug report about me.

14The count gate was measuring the proposal grid

At merge 0.18 s the proposal stage returns 855 candidates in 43 bars whose written total is 843. Section 8 recorded the symptom, 797 positives against 58 forward negatives with the threshold on a boundary. The cause is worse than a threshold problem.

CounterMAEMedianp95Max
the classifier, as reported in section 50.841.02.003
accept every proposal, no classifier at all0.841.02.003
same geometry on the lead guitar stem1.91———

The count criterion in section 5 is withdrawn

One proposal per sixteenth in a bar whose written content is one stroke per sixteenth counts correctly by construction, so the classifier contributes nothing to the count. The geometry is not content-free, because the lead guitar stem under the same merge scores 1.91 against the cymbal stem's 0.84. The count still cannot be read as detector performance. Before quoting a detector's count error, run the same count with the detector removed.

15One-to-one matching, and the gap that was computed rather than measured

The 80 ms window rested on two unmeasured assumptions: that matching was one-to-one, and that 268 ms was the minimum written ride spacing. Both are now measured. Across 800 within-bar gaps the minimum is 254.2 ms, with zero gaps under 200 ms, so the widest window in which a match can be unique is 127.1 ms rather than the 134 ms carried before. 80 ms sits below both figures.

WindowNearest neighbourOne-to-oneShifted controlRatio
10 ms25.1%25.1%3.4%7.33x
20 ms45.4%45.4%5.3%8.64x
40 ms69.8%69.8%12.2%5.75x
60 ms84.3%84.3%20.3%4.16x
80 ms89.5%89.5%23.6%3.79x
100 ms92.2%92.2%30.1%3.07x
127 ms94.3%93.7%40.3%2.32x

The two matchings are identical through 100 ms and separate only at 127 ms, so the position result survives its caveat. The whole curve is published here and 80 ms is one named operating point on it.

16Bars 17 and 51, decided

Every bar number in this section indexes TEMPOFIX-INT-on-r8973389-Brandon-edit.gp track 8, the drum staff of Songsterr s6857183 revision r8973454, read through data/labels_gp.json.

Bars 17 and 51 write zero ride while the stem shows a ride at neighbour amplitude. Bars 99 to 105 were read as silent by eye, one bar per panel on a shared dB scale, and that made the coda the control this decision used. Bar numbers here are 1-based.

The control group's label was withdrawn by a concurrent session

That session re-rendered the coda at native scale rather than on a shared y-axis where bars peaking near 0.05 sat against bars peaking near 0.9. Bars 99 and 100 carry 10 to 12 discrete cymbal attacks, peaking 0.0526 and 0.0504 against bar 17's 0.1708, identity unresolved. Two independent measurements agree on the gap: that peak ratio is 3.25x and the median patch energy below gives 3.34x. Bar 105 is untouched by the correction, sitting at 0.0070x, 12.1x below the quietest of bars 99 to 104. The refusal below therefore rests on bar 105 rather than on the coda as a block.

BarKindTab writesProposalsKept at 90% recallMedian energy vs a stroke
17question020190.610x
51question020190.609x
87question020200.803x
99coda, identity unresolved021210.182x
101coda, identity unresolved019190.218x
103coda, identity unresolved021210.122x
105read silent by eye030300.007x

Question bars average 19.3 detections and coda bars average 19.9, a separation of 0.97x. That whole-block comparison is the weaker half now that bars 99 to 104 are known to carry some cymbal activity. The strong case is bar 105, which keeps 30 of 30 proposals, the most the detector keeps anywhere in the song, on 0.0070x of a stroke's energy, the least anywhere in the song. On that bar the score carries no information about whether the bar contains playing.

Amplitude separates them, and ring-out is refuted

Question bars sit at 0.609 to 0.803 of a verified stroke and every coda bar sits at 0.084 to 0.218, a 2.8x gap with no overlap. Both question bars follow a full-ride bar and a ride cymbal rings, so sustained energy needed its own test. Energy by quarter of the bar, normalised to each bar's own first quarter, gives Q4/Q1 of 1.07 for bar 17 and 0.82 for bar 51 against a full-ride median of 0.75. A decaying bar falls well below 1.0. Bar 87 gives 0.04, so it collapses by its last quarter and reads as the half-bar pause it was called.

Presence is established. Count and position are not. No note ships.

The count in those bars is the proposal grid, which section 14 shows counts nothing on its own. The positions have never been validated in a bar with no written strokes, because the 89.5% at 80 ms was measured only where written strokes exist to match against. Writing twenty sixteenths into bar 17 would be writing the grid. The reason for refusing is upgraded rather than repeated: direction sensitivity passed at 81.2%, and the claim that fails is presence against position, with bar 105 as its proof.

17The three follow-ups, and the identity correction

The count claim is not earned at any density. Lowering the peak-pick separation admits more acoustic peaks with no lattice imposed. At 1.01 candidates per written note the classifier gives MAE 0.79 against accept-all's 0.84. At 3.26x it gives 4.28, at 4.03x 5.07, at 6.01x 5.21, against a target under 1.00, with thresholds mid-range at 60 to 67% of their searched range. The classifier only ties accept-all where it has nothing to reject.

The 149 direction failures are an alignment population. Peak offset from the flux pick separates 9.3% in its bottom quartile against 43.6% in its top, a 34.3 point spread, medians 5.805 ms against 46.440 ms. Waveform symmetry separates zero points, 19.5 against 19.5, so the obvious acoustic hypothesis is rejected by its own data.

Bars 17 and 51 were inspected directly, one bar per panel at native scale. Each carries about twenty sharp attacks, peaking at 0.748x and 0.628x of written full-ride bar 18, with HF share 58.6% and 56.9% against that control's 45.0%. Positions stay undetermined because the on-grid test gives coda control bar 104 87.5% against the written control's 68.8%, so it has no discriminative power.

Amplitude shows stronger cymbal energy rather than ride identity

Sections 16 and the coda amendment leaned on the 2.79x gap harder than it carries. Once bars 99 and 100 are known to hold unresolved cymbal attacks, being louder than them says nothing about whether the energy is a ride stroke. Bar 105 now rests on a different quantity: its events sit at 26.6% HF share against 45.0% for the written ride control, so they are high-frequency poor and are not ride attacks. The counterexample survives on bar 105 alone, keeping 30 of 30 proposals in a bar whose content is not ride. Bars 99 to 104 are retained as unresolved comparison bars rather than as negatives. No note ships.