Skip to content

Repitch 0.2.2-experimental: rests while no track uses REPITCH (owner-approved) - #1866

Draft
repeat98 wants to merge 17 commits into
mainfrom
module/repitch-0.2.2
Draft

repeat98 wants to merge 17 commits into
mainfrom
module/repitch-0.2.2

Conversation

@repeat98

@repeat98 repeat98 commented Nov 20, 2026 •

Copy link
Copy Markdown
Owner

Repitch 0.2.2-experimental: costs almost nothing while no track uses REPITCH. It rests until a track (or any Part of the project) uses REPITCH, and wakes for it. The owner approved it on 26 November 2026 ("I approve Repitch 0.2.2 as in #1866"), recorded as an owner-approved update. The release files are complete and npm run module:doctor -- repitch is green. It stays a draft: two tests fail, and only the owner can change them.

What works: on the owner's MKII, the build just before this one (c97b00a4) added +0.2 and +0.1 points of the frame interrupt at rest, against +2.2 for 0.2.1. It woke when a track was set to REPITCH while playing, and Part and project Save and Reload kept every assignment with no skipped render. The released package e3c37df6 only trims the Part sweep. It is the build the five emulator checks of repitch_in_use passed on.
What is not checked: the exact package e3c37df6 has not run the test procedure on a unit (power cycle, removal, edge cases), and nobody has listened to a REPITCH track on it. Its cost at rest has not been read either; the owner waived current-build hardware evidence.
Who must act (the owner):

  1. src/engine/elekloader/module-set.test.ts line 141-145 ("refuses hook words a subscriber's manifest does not declare") uses the published Repitch package as a fixture and assumes its only subscription is hook word 4. 0.2.2 also subscribes ev_in_use (hook word 54), so moving word 4 no longer leaves the package without a subscription, and prepare resolves instead of refusing. The test needs to clear every subscription word (or use another fixture). That is a test edit, so it needs your OK, or a Fix: pull request of its own.
  2. src/engine/elekloader/module-set-memory.test.ts line 33 needs at least 10 published packages with a reading in docs/verification/2026-11-21-octatrack-module-pool-allocation.json. Repitch 0.2.1 (4b927846) was one of the 10, so with 0.2.2 published there are 9. The record's method takes two rolled-back RAM trials per package on its named development twin 8850f539. A reading on another twin does not fit that record, which names one base. What it needs: on that twin, npm run device:price -- --memory --out FILE repitch, twice, and a measurements entry for e3c37df6 (computed loader extent 2,704 bytes), or your decision on how a reading from a later twin may be recorded.

Repitch is neither an effect nor a machine, so it has no instance curve: device:price --curve answers "not an effect or a machine: no curve", and module:doctor agrees ("admission charges it no instance cost").

What changes for players

  • Installed and used nowhere, Repitch costs almost nothing: it rests until a track uses REPITCH.
  • Any Part of the project with a track set to REPITCH keeps it awake, so Part and bank changes play as before.
  • Known gap, in the release notes: a sample whose own TIMESTRETCH is REPITCH, on a TSTR AUTO track, is seen only on the playing Part. Brought in by a Part change while playing, its first moments may play at stock speed.
  • It needs a base with ev_in_use (0.7.8 or newer).

How

  • repitch_in_use answers ev_in_use. It is nonzero while REPITCH is in force on a track of the live Part (the same rp_find the increment builder uses). It is also nonzero while a STATIC or FLEX track of any working or saved Part has SRC SETUP TSTR on REPITCH. The sweep reads half a Part a UI tick (about four seconds a sweep), and skips while the live Part uses REPITCH.
  • runtime.json marks rate_gate and pitch_gate "rests". tstr_resolve stays patched: it keeps the voice renderer away from TSTR 4, a value only Repitch adds.
  • Package: e3c37df63692c4a91675f0e8741d47837929ea6256fecb03d082d059c94b02b7 (1,872 bytes). It was built with build-modules-isolated.sh from this branch after merging main (48f4a9b) and imported, and octatrack:module-packages publishes it. Tape Echo's and Euclid's standalone recipes are re-pinned to the rebuilt rom-packages.json. 0.2.1's package leaves public/.
  • Approval: sdk/approvals/repitch-build-approval.json, an owner-approved update with 0.2.1's waivers: current-build-hardware, chip-worst-case-cycles, complete-memory-bounds and release-documentation. 0.1.2's captures stay (retainedUiVersion), since the screens are unchanged.
  • Performance record: evidence/performance.json is new, because a release from 24 November needs one. Its cycle, stock-benchmark and stress rows stay empty under those waivers, as POLY8 0.3.3's and USB Audio 0.4.1's do. Their method texts say what was measured, and on which build.
  • CPU price: resources.cpuPrice keeps 0.2.1's 0.8 (17 November 2026, TESTING.md). The figure is labelled with that package.
Measurements and the discarded reading

All on the owner's MKII, OS 1.40C, with every trial rolled back.

Build When, base Result
c97b00a4 (before the sweep trim) 20 Nov, twin be86323a of 0.7.11, A01 Part 4, seven FLEX tracks at rest +0.2 / +0.1 points of the frame interrupt (0.2.1: +2.2), zero skipped renders
c97b00a4 21 Nov, same twin 12 Part switches and Undo; T1 and T5 on RPCH, 5,855 frames, 0 skipped; Part Reload and project Save and Reload with Euclid and Tape Echo, 42.0 % over 5,858 frames, 0 skipped
c97b00a4 22 Nov, twin 9203cdf6 of 0.7.14, a scene where REPITCH is in use +2.7 points, the same as 0.2.1
untrimmed sweep 25 Nov, twin 493c9cc5 of 0.8.1, stopped about +20 µs per UI tick, hence the trim
e3c37df6 25 Nov, emulator five repitch_in_use checks pass (TESTING.md)

On 26 November e3c37df6 ran one device:price trial on the twin then booted, 289c66b9. That twin is an unreleased 0.8.3 base from another session, so the reading was discarded and nothing from it is recorded. One observation from that trial: Repitch stayed awake through every installed reading, stopped and playing, because rate_gate and pitch_gate held its detours. The project then loaded therefore uses REPITCH, so a scene for its cost at rest has to be one where no track or Part uses it. Its installed pool read 2,720 bytes on that base, against 2,704 that poolExtent computes for main's loader.

Tested on a unit: package c97b00a4 (0.2.2 before the sweep trim), Octatrack MKII, OS 1.40C, development twins of 0.7.11 and 0.7.14: cost at rest, wake on RPCH, Part and project Save and Reload, Undo. The released package e3c37df6 was not tested on a unit; the owner approved it without that.

Edge cases

Case Why this change makes it a risk How run Result
Installed and unused resting hooks should add at most 0.2 points device:price, two paired MKII windows on 0.7.11 pass on c97b00a4 (+0.2, +0.1); not run on e3c37df6
A track switched to TSTR REPITCH while playing the first tick plays at stock speed observed over USB across the switch woke on c97b00a4; the first tick's increment was not captured
A sample with TSMODE REPITCH on a TSTR AUTO track rp_find must see it set AUTO, read the increment not run: AUTO on a populated sample slot was not confirmed on the unit
A Part change bringing a REPITCH track in while playing the sweep must have seen it emulator call on repitch_in_use with poked Parts pass (emulator, e3c37df6); not run: a live capture on the unit
The same with an AUTO track whose sample is REPITCH only the live Part sees it (known gap) capture across the Part change not run: needs a matched hardware run
A REPITCH sample without a tempo Repitch does nothing there, so it may rest read the increment pass in the ColdFire interpreter on c97b00a4; not run on the unit
Undo of the trial over a resting Repitch its resting sites go back whole-set trial and Undo pass on c97b00a4 (empty inventory, next window 51.4 %)
Power cycle, removal, MKI the release package's lifecycle not run not run: waived by the owner for this version

Guides: two things were missing, and neither is fixed here because a module release stays free of guide edits.

  • module-set.test.ts uses the current Repitch package as a fixture, so a Repitch release that adds a hook breaks a loader test. Nothing in the release guides warns of this.
  • The pool record's single developmentBase gives no way to add a reading of a new package version from a later twin.

npm run module:doctor -- repitch: green. npm run pr:ready: see the checks. On this Mac, src/tooling/check.test.ts and test_volatile_service.py also fail, for reasons outside this change: the test's PATH finds Python 3.9, and clang turns the sprintf deprecation into an error. CI decides those.

  • Changing a module someone else wrote: not needed. Repitch is the owner's own module (author repeat98).
  • I read the guide for its category in docs/module-guides/, and TESTING.md lists what I did not test.
  • Source and media are mine or properly licensed, with authors and full licence texts kept. Nothing comes from Elektron firmware.
  • Screenshots are real captures of the current module UI (0.1.2's, kept: the screens are unchanged). Hardware results are what was seen on a named build; emulator results are labelled as emulator results.

🤖 Generated with Claude Code

repeat98 and others added 4 commits November 20, 2026 13:44
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… to close it

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t a tick, so Part and bank changes find it awake

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@repeat98

Copy link
Copy Markdown
Owner Author

Unit run on base 0.7.14, 22 November 2026: owner's MKII, twin 9203cdf6, package c97b00a4… (byte-equal to this PR's). In Dev17 C01, T5's loop resolves REPITCH, so Repitch is in use there and stays awake, as it should. 0.2.1 and 0.2.2 both cost +2.7 points of the frame (42.1 % against 39.4 %, longest frame 85.2 / 84.1 %). No regression; the rest itself is not shown in that scene.

repeat98 and others added 3 commits November 25, 2026 09:39
Installed alone on a 0.8.1 dev twin the first sweep added about 20 us to every UI
tick: one Part a tick, 16 reads of the uncached banks. Now half a Part a tick, its
type bytes in two word reads (at most 6 bank reads), and no sweep while the live Part
uses REPITCH; the sweep then restarts whole and the answer holds 1 until it ends.
Emulator: five poke/call checks pass (TESTING.md). Module 912 bytes, e3c37df6.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@repeat98

Copy link
Copy Markdown
Owner Author

Sweep trimmed (961cc4795). Installed alone on the owner's MKII, the first sweep added about 20 µs to every UI tick (development twin of base 0.8.1, stopped, profile:3): one Part a tick meant 16 reads of the uncached banks.

Now it reads half a Part a tick, at most 6 bank reads, and skips the sweep while the live Part uses REPITCH. The sweep then restarts from the first Part and the answer holds 1 until it ends, so a Part change still finds Repitch awake. A whole sweep now takes about 4 s instead of 2 s.

Emulator, poke and call on repitch_in_use: all five checks pass (details in TESTING.md). Not measured on the unit yet.

One more thing from today: on project Dev17, 0.2.2 wakes as soon as the unit plays. Every track there is on TSTR AUTO, and rp_find reads the bound samples' timestretch mode as REPITCH, so Dev17's samples are probably set to REPITCH. The sample ATTRIBUTES page on the unit will confirm it.

repeat98 and others added 7 commits November 26, 2026 15:59
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nce record

The owner approved it on 26 November 2026 ("I approve Repitch 0.2.2 as in
#1866"), recorded as an owner-approved update with 0.2.1's waivers
(current-build hardware, chip worst-case cycles, complete memory bounds,
release documentation; 0.1.2's captures kept). The performance record a
release from 24 November needs leaves the unmeasured rows empty under
those waivers and says what was measured, on which build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…pe pins

The isolated build (modwerk-source-tools edb8c067, source c9fc7fe)
imported with modules:import --development; Tape Echo's and Euclid's
standalone recipes re-pinned to the rebuilt rom-packages.json.
octatrack:module-packages publishes Repitch 0.2.2's USB package
e3c37df6 (1,872 bytes), the build the 25 November emulator checks ran;
--check: every other published package identical. 0.2.1's package
leaves public/.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… on which build

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… Modes 0.2.4); e3c37df6 unchanged

The isolated build (modwerk-source-tools edb8c067, source bb35d5b)
imported with modules:import --development; the module build record
names the merged commit. octatrack:module-packages --check: every
published package identical, Repitch e3c37df6 and Mute Modes 7542f10c
among them; the standalone recipe pins still match.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@repeat98 repeat98 changed the title Repitch 0.2.2-experimental: rests while no track uses REPITCH Repitch 0.2.2-experimental: rests while no track uses REPITCH (owner-approved) Nov 26, 2026
repeat98 and others added 2 commits November 26, 2026 21:47
…ild reproduced) and tonight's unit trials

npm run test:procedure -- repitch --no-unit --no-emulator: steps 1-4 pass and step 3 rebuilds
e3c37df6 byte for byte. Two rolled-back device:price --memory trials of e3c37df6 on twin 46c30886
of base 0.8.2: +0.0 points at rest, module pool 2,720 bytes, inventory empty after. The unit steps
of the runner, a power cycle and a listen stay not run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@repeat98

Copy link
Copy Markdown
Owner Author

Repitch 0.2.2: pr:ready passes now. It stays a draft until you say the exact build is tested. No player-facing change tonight.

  • Merged main, including Fix: the module-memory check counts base 0.8's larger module record; pool readings on a 0.8.2 twin #2284. The pool test counts this package again.
  • Test procedure record, now in TESTING.md: npm run test:procedure -- repitch --no-unit --no-emulator. Steps 1–4 pass, and step 3 rebuilds e3c37df6 byte for byte.
  • On your MKII: two rolled-back device:price --memory trials of e3c37df6, on twin 46c30886 of base 0.8.2.
    • At rest: +0.0 points of the frame interrupt.
    • Module pool: 2,720 bytes.
    • Inventory empty after each trial.
  • No curve is needed: Repitch is neither an effect nor a machine.
  • Not run: the runner's unit steps (scripted pass, soak, put back), a power cycle and a listen.
  • Who must act: you. Marking it ready is your call, because it changes a package; then the timed merge takes it.

🤖 Generated with Claude Code

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant