patches_test.cc: the VLFO leak comment names the wrong patch and undercounts the blobs it reaches #70
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
bcox/tymbal#70
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
patches/patches_test.cc, in the comment block aboveBank.EveryBlobsMacroKnobsAreItsOwn, records a known and deliberately-unfixeddata issue:
Init()does not resetpatch().lfo, so//patches:install'sreused
Instrumentleaks one patch's voice-level LFO shapes into every blobserialized after it.
The finding is real and still real. Its specifics are wrong, and the way
they are wrong hides how far the leak now spreads.
The comment says:
Measured against the registry as it stands (31 patches):
helicopteris at index 11, not 9.helicopteris not the last patch to set voice LFOs. Seven patches setthem:
kargyraa(8),rattlesnake(10),helicopter(11),filter-whistle(12),juno-pad(16),sem-pad(17), andarp2600-burble(21). The last isarp2600-burble.each blob carries whichever LFO-setting patch most recently preceded it.
wind(9) carries kargyraa's; 13-15 carry filter-whistle's; 18-20 carrysem-pad's; 22-30 -- nine blobs -- carry arp2600-burble's.
other patch, against the "twenty of thirty" the comment states.
What is still true, and worth keeping when this is rewritten: only
patches/rattlesnake.handpatches/helicopter.hroutekSharedLfo1orkSharedLfo2at all, so for every contaminated blob this remains dead datathat the editor would nonetheless show. The leak is still inaudible. It is the
scale and the shape of it that the comment now understates.
The comment's closing trade-off is also stale: it says closing the leak "moves
twenty shipped blobs where the macro fix moved three." On the numbers above it
would move about sixteen, and they would move to different values than the
comment implies, since the contaminating patch differs per segment.
Two things to do, and the second is the point:
inferred counts. I derived the segmentation from the registry order and a
grep for
patch().lfo; the byte-level claim ("nineteen bytes inside VLFO'sfifty-six") should be re-measured, not carried forward.
because it moved twenty blobs; it is not obvious that a leak which has
silently grown a segmented shape is more safely left than fixed. Closing it
is
Init()resettingpatch().lfo, and the test above is already theinstrument that would catch a regression.
This is a fifth instance of the hand-maintained-count problem in #63 -- the
registry index, the "last patch", and both blob counts all drifted together
because nothing derives them. Anything rewritten here should derive from
patches::Count()and the registry rather than restate them.Found while fixing an adjacent stale count on branch
fm-followups, whichadded a 31st patch and shifted every index in that comment by one. The
substantive error -- helicopter not being last -- predates that branch.