Skip to content

Scale Quantizer 0.1.5-experimental: without the two panel sites, so FM Synth can install beside it - #1886

Merged
repeat98 merged 54 commits into
repeat98:mainfrom
timhastie:scale-quantizer-0.1.5
Nov 24, 2026
Merged

repeat98 merged 54 commits into
repeat98:mainfrom
timhastie:scale-quantizer-0.1.5

Conversation

@timhastie

@timhastie timhastie commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

This is the Scale Quantizer update you asked for on #1146 and again on #1272: 0.1.5 no longer hooks the two panel sites, so a later FM Synth update can install beside it.

Module update: Scale Quantizer (quantizer), 0.1.4-experimental -> 0.1.5-experimental. I am its author. The update started on main 208f05a6. Current main 4c15a84f (base 0.8.1) is merged, without rebasing. The package remains byte-identical (092a8a13, 7,038 B). The runtime and hardware results below retain their actual base 0.7.10/0.7.12 labels; this merge is not a new hardware test.

What changes for players: nothing they hear or see. The package hooks fewer stock sites.

  • 0.1.4 hooked 0x4004fc84 (16 B) and 0x40005162 (8 B) for my 2.21 panel publication. That code only runs beside FM Synth, in FM Synth's own copy of the quantizer. In Scale Quantizer alone, the two detours only replayed the stock instructions they displaced.
  • 0.1.5 leaves both out. The wrapper keeps all 28 guards, because my manifest reads all of them as it loads, and hooks 26 (_without_panel). The runtime port drops the include's second pass, so the package carries no stock copy of 0x4004fc84 either.
  • The upstream quantizer is my public v2.23 tag, e908beb0. Its only quantizer change is FM Synth's project comment line, which assembles only beside FM Synth (HAVE_SYNTH 0 here).
  • Release notes: src/community/module-changelogs/quantizer.json, 0.1.5.

The package: quantizer/0.1.5-experimental.mwrm, 7,038 B, 092a8a13…. 7 stock-code sites (was 9), 5 stock copies (was 6), 19 hooks, 105 relocations, 5,852 B of code and data, no bss. It rebuilds byte-identical on current main; the package has no requiredBase, and the base changes since 0.7.1 do not move its bytes. Strict stock-free scan: longest shared run 11 bytes (it fails at 12). It replaces the 0.1.4 package. Your CPU price from 0.1.4 (0 % of a frame, 18 November) stays in the manifest; 0.1.5 has not been measured on a unit. The at-rest reading in evidence/cpu-price.json (0 points of the frame interrupt) is also 0.1.4's, taken on base 0.7.8. module:doctor accepts it, but under your new rule a new release is measured again, so 0.1.5's own reading is still owed. It needs a unit.

Also in this pull request: quantizer_runtime.py (the new quantizer.s pin, the HAVE_SYNTH flag, the standalone include without its panel pass), the quantizer sources re-pinned in machine-ports.json, Scale Quantizer's recipe recaptured in machine-recipes.json (5 copies, 0x4004fc84 gone) using the current builder's per-module machine-ports.json fingerprint; the other machine recipes remain exactly as on main, the engine assets from the isolated build (Tape Echo's and Euclid's pinned inputs did not change in this merge), the import record for v2.23, the catalogue entry, the module documents, the package list, the affected import, source-scope and catalogue tests, TESTING.md and the limitation line about FM Synth.

Compatibility: compatibility.conflicts stays [] and the UI claims are unchanged. FM Synth 0.1.5, released in #1928, still declares a conflict with quantizer. Its idle-rest/CPU update does not provide compatibility with this standalone package. The pair results below are specifically for FM Synth 0.1.4; I have not played the new 0.1.5 pair. My full-engine update remains separate and still needs the engine-job contract requested in #1272.

How I checked it. These are emulator results, on base 0.7.12 built from main a241c595 (identity 254c5a75), with copied cards. The same sessions ran before on base 0.7.10 (identity b1c76d06, main cda22b81) with the same results.

  • Installed over USB with Keep: the 7 sites hold. Removed: every site is restored. After a power cycle it installs again.
  • A project saved with 0.1.4 reloads on 0.1.5 with the same scale settings. SAVE PROJECT then writes the same project bytes.
  • The SEQUENCER rows SCALE, ROOT, GLIDE, TRACK and FOLLOW show and can be edited. FOLLOW turns off and on with YES.
  • Pitch, four windows per track: the following track plays 344.531 Hz and the track with FOLLOW OFF plays 365.012 Hz (+1 semitone, its Part PTCH). With FOLLOW turned off on the first track, both play 365.012 Hz.
  • After SAVE PROJECT and a power cycle, the rows, the settings and both pitches come back.
  • MIDI: three notes at 61 with FOLLOW OFF and three at 60 with FOLLOW ON in C MAJOR, each with its note-off.
  • Upgrade from a kept 0.1.4, on a card holding a project saved with 0.1.4. The card's newest set then holds only the 0.1.5 package, and the four points you named:
    1. Old hook sites: 0x4004fc84 and 0x40005162 read stock during the upgrade trial, after the upgrade, after SAVE PROJECT and after a power cycle.
    2. FOLLOW: on audio and on MIDI as in the pitch and MIDI lines above, after the upgrade.
    3. Undo: the upgrade offered as a trial and read during it (one entry, 0.1.5's 7 sites patched), then undone, brings back 0.1.4 with its set identity and its nine patched sites byte for byte.
    4. Saved settings after a reboot: the settings, the rows and both pitches come back.
  • Undo of a held and of an unheld trial, and a refused set (0.1.5 plus device.mjs set's +refuse pair, refused at verify before anything was applied): inventory, set identity and sites come back unchanged each time.
  • Beside FM Synth 0.1.4 as released, in either order, the loader admits both and the 7 sites hold. FM Synth 0.1.4's 24 sites include none of the quantizer's, but it declares a conflict with it, so the configurator flags the pair and I did not play it. Removing the quantizer leaves FM Synth alone.
  • Beside Tuner 0.1.0: both install and stay intact, and removing the quantizer beside Tuner restores its sites and leaves Tuner whole.

Not tested: the at-rest reading of 0.1.5 and the two old hook sites on a unit (both need a development base started in RAM), the full 16-window pitch matrix, FOLLOW on FM tracks, the whole catalogue set, an empty-battery cold boot, and Tuner's removal beside the quantizer (on the emulator the base refuses it, see below). BlackPyramids has no released package on main, so that pair is untested; keep FOLLOW OFF on its tracks for now.

Tested on a unit: my Octatrack MKI, OS 1.40C, base 0.7.12 (254c5a75), 20 and 21 November 2026. The upgrade from a kept 0.1.4 (trial, roll-back, Keep), FOLLOW on audio and MIDI by ear, and the saved scale after a power cycle all work. Not read on the unit: the two old hook sites and the at-rest cost. The record is in TESTING.md.

Edge cases (emulator results are not hardware evidence; each open row is "not run" with its reason):

Case Why this change makes it a risk How run Result
Install with Keep, then remove the package patches 7 sites; 0.1.4 patched 9 emulator, base 0.7.12, over USB; every site read after each step pass (emulator, base 0.7.12): 7 patched, then 7 exact stock; the set identity returns to the empty set's
The two sites 0.1.5 no longer hooks, 0x4004fc84 and 0x40005162 they must stay stock with the package installed emulator, base 0.7.12: both read on the running base after each Keep and hashed against 0.1.4's stock hashes pass (emulator, base 0.7.12): both stock with 0.1.5 installed, alone, beside FM Synth 0.1.4 (either order), after a power cycle, after the replace and during the upgrade trial
0.1.5 installed over a kept 0.1.4 the replace must put stock back at the two sites only 0.1.4 patched emulator, base 0.7.12, on a card holding a project saved with 0.1.4: Keep 0.1.4 (9 sites patched), the upgrade offered as a trial and undone, then kept; reload, FOLLOW, SAVE, power cycle, MIDI; then removal pass (emulator, base 0.7.12): one inventory entry, and the card's newest set holds only the 0.1.5 package.
(1) Old hook sites: both stock during the upgrade trial, after the upgrade, after SAVE PROJECT and after the power cycle.
(2) FOLLOW: on audio 344.531 Hz following, 365.012 Hz not following, both 365.012 Hz with FOLLOW OFF; on MIDI 3 notes at 61 OFF and 3 at 60 ON, each with its note-off.
(3) Undo: read during the trial (one entry, 0.1.5's 7 sites patched), then undone: 0.1.4 back with its set identity and its nine patched sites byte for byte.
(4) Saved settings after a reboot: settings, rows and both pitches back.
After removal all 9 sites stock
Power cycle after Keep the boot restore replays the new 7-site set emulator, base 0.7.12, card and battery RAM carried over pass (emulator, base 0.7.12): active at boot; rows, settings and both pitches back
A project saved with 0.1.4, reloaded on 0.1.5, then SAVE PROJECT the settings must read and write as before emulator, base 0.7.12 pass (emulator, base 0.7.12): same settings; the project files equal 0.1.4's save
Pitch and MIDI notes with FOLLOW ON and OFF the native object changed emulator, base 0.7.12: four windows per track, three notes per state pass (emulator, base 0.7.12): 344.531 Hz following, 365.012 Hz not following (+1 st); 3 notes at 61 OFF, 3 at 60 ON, each with its note-off; the MIDI bytes equal those on base 0.7.10
Beside FM Synth 0.1.4, quantizer installed first FM Synth 0.1.4 carries its own copy of the quantizer and declares a conflict with Scale Quantizer emulator, base 0.7.12: Keep the quantizer, then FM Synth 0.1.4; then the quantizer removed pass (emulator, base 0.7.12) for the install: the loader admits both, the 7 sites hold and the two dropped sites stay stock; FM Synth 0.1.4's 24 sites include none of the quantizer's. Removing the quantizer leaves FM Synth alone with the 9 quantizer sites stock. Not played: FM Synth 0.1.4 declares the conflict
The same pair, FM Synth installed first as above emulator, base 0.7.12: Keep FM Synth 0.1.4, then the quantizer, then the quantizer removed pass (emulator, base 0.7.12) for the install: admitted, no refusal, the same set as the other order, the 7 sites patched; its removal leaves FM Synth alone with the 9 quantizer sites stock. Not played: a declared conflict
Beside Tuner 0.1.0, then Tuner removed another module's removal must leave the 7 sites emulator, base 0.7.12; control: Tuner alone on a card where the quantizer was never installed, on bases 0.7.12 and 0.7.10 not run: on the emulator the base refuses Tuner's removal (refusal 5, busy), also with Tuner alone on a fresh card, on 0.7.12 and on 0.7.10; cause not traced. The pair installs (self-test: 2 intact) and the quantizer's 7 sites stay patched; removing the quantizer beside Tuner restores its 7 sites and leaves Tuner whole
The card's saved set after the removal the removal rewrites MODWERK0.SET or MODWERK1.SET shorter emulator, base 0.7.12, FAT chain listing fail: the set file's chain ends in a free cluster (MODWERK1.SET 7,680 -> 512 B, 15680 -> 15681 -> free). Reproduces on 0.7.12 and 0.7.10. The base's writer, not this package: #1830
Undo of an install or a trial the loader paths around the new site list emulator, base 0.7.12: Undo of a held and an unheld 0.1.5 trial on an empty set, and of a held 0.1.5 replace over a kept 0.1.4 pass (emulator, base 0.7.12): inventory and set identity back each time; every site stock, or 0.1.4's nine patched sites byte-identical to before
A refused set the set must roll back whole emulator, base 0.7.12: one set of 0.1.5 plus device.mjs set's +refuse pair, on an empty set and with 0.1.4 kept pass (emulator, base 0.7.12): refused at verify (refusal 3, conflict) before anything was applied; inventory, set identity and all 9 sites unchanged both times
A trial that expires with SEQUENCER open the loader paths around the new site list emulator, bases 0.7.12 and 0.7.10: page reopened inside the trial (SCALE and ROOT on screen), no USB request, then keys on the page; control: the same walk with Scale Quantizer 0.1.4 fail: no crash and the 7 sites are stock from about 9 s, but the page does not redraw: it shows SCALE and ROOT until the next key, then two blank rows that do nothing (YES, arrows, LEVEL) until the page is left. 0.1.4 shows the same screens byte for byte on both bases, so this update did not introduce it. It looks like the base's expiry path; not traced
Installed and used nowhere: cost at rest the owner's limit of 0.2 points of the frame interrupt applies to a new release not yet not run: needs a unit (npm run device:price); the committed reading (0 points) is 0.1.4's, on base 0.7.8
All of the above on base 0.7.12 the base moved after my runs on 0.7.10 emulator, base 0.7.12 254c5a75, rebuilt from main a241c595 pass (emulator, base 0.7.12) for every row above but the two marked fail, the Tuner removal (not run: refused by the base on the emulator) and the cost at rest (not run: needs a unit)
On a unit an emulator result is not hardware evidence my MKI, base 0.7.12 254c5a75, packages sent with npm run device -- try pass for the upgrade from a kept 0.1.4 (trial, roll-back four times, Keep), FOLLOW on audio and MIDI by ear, and the saved scale after a power cycle (eight runs). Not run on the unit: the two old hook sites and the at-rest cost (a development base in RAM). One observation not reproduced: SCALE one step lower after the first two runs of the sequence; TESTING.md has it

Known issue, unchanged from 0.1.4 (read from the code, not captured): the held chromatic key's mark on an FM track uses Scale Quantizer's own octave. With FM Synth installed, FM Synth's copy takes ev_octave_key, so the mark sits n octaves off at FM octave ±n (right at 0). An exact fix needs a base take event at the mark's site, 0x40044abc.

A base issue, reported in #1830: when the base rewrites MODWERK0.SET or MODWERK1.SET with a shorter set, the file's last cluster still links to a cluster that is now free. It is not tied to one module: it happened with the removal of FM Synth, Tuner and Scale Quantizer whenever the new set was shorter. It was reproduced on bases 0.7.10 and 0.7.12. The quantizer never writes these files. Your fix shipped in base 0.8 (#1910), retaining the prior file length for a shorter logical set. I have not repeated shorter Keep followed by SAVE PROJECT on the exact 0.8 release or on 0.8.1 hardware; #1830 remains open for that check.

Two things I saw on the emulator that this update did not introduce:

  • When a trial expires with no USB request while the quantizer's SEQUENCER rows are open, the page keeps showing SCALE and ROOT until the next key, then two blank rows that do nothing until the page is left. Scale Quantizer 0.1.4 shows the same screens byte for byte on bases 0.7.10 and 0.7.12, so this update did not introduce it. It looks like the base's expiry path; I did not trace it.
  • Bases 0.7.10 and 0.7.12 refuse the removal of Tuner 0.1.0, and of FM Synth 0.1.4 in the session that kept it, with refusal 5 (busy), also with either module alone on a card where the quantizer was never installed. On base 0.7.9 Tuner's removal went through, and FM Synth's went through on 0.7.10 in a later session after a power cycle. I did not trace it, and I cannot say whether a unit does the same.

What only you can clear:

  • The approval record for 0.1.5 in sdk/approvals/quantizer-build-approval.json. Native source: 931d9cd97feb3e46a9ac0d72581d7587980d92d0e9cd9838cc38ae479a66e8d1. Until it is in, modules:check and the module rules line of module:doctor stay red, and npm run check stops there.
  • Review of the shared adapter files (quantizer_runtime.py, machine-ports.json, machine-recipes.json). They take this update off the automatic path.
  • The earlier shared-input coupling is corrected on current main: machine_inputs now hashes each module's own canonical machine-ports.json row. This merge retains main's non-quantizer recipes and uses the same unchanged builder function for the quantizer's source pins. The published base, controller trust record and approval files are unchanged from main.

Guides: docs/TEST_PROCEDURE.md does not say that npm run test:procedure -- quantizer stops at step 3: module:dev --build-only cannot build a module that needs its machine path. With --package and the committed package it runs. I have not opened a Docs: pull request for it.

  • Changing a module someone else wrote: not applicable, I am the author.

  • I read the guide for its category in docs/module-guides/ (and sequencing.md if it acts in time), 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. They are 0.1.5 emulator captures; the 0.1.4 records stay under media/0.1.4/. The hardware results for this build are author-reported and in TESTING.md.

  • Automatically merge and publish my module update after checks pass.

  • I verified the source, licences, UI and qualification reports, including instance isolation and Part/project/reboot persistence where applicable; no required acceptance check is failed or untested.

Validation commands and results:

  • Earlier procedure evidence, on base 0.7.12: npm run test:procedure -- quantizer --no-unit --package public/octatrack-modules/quantizer/0.1.5-experimental.mwrm passed steps 1 to 4 with a local stand-in approval record that was not committed. Without it, step 1 stopped at the module rules line. On the emulator (npm run device:emulator on a development twin of base 0.7.12, the same command with --package), steps 6, 7 and 10 passed as well; 8 and 9 were not run there by design, and 11 and 12 are a unit's. These were not repeated on base 0.8.1.
  • Current merge, 23 November: the isolated Docker module build and import-module-build.mjs --development --check-only --verify-existing pass. The Quantizer package is still exactly 092a8a13, 7,038 bytes.
  • build-elemod-isolated.sh and verify-elemod-release-exports.mjs reproduce 72 current source-only exports. test-base-bound.sh passes using a local copy whose only difference is an explicit Docker-shared temporary-directory prefix. The first attempt could not enter the container because macOS selected an unshared temporary directory; the failed launch is retained in the local record.
  • octatrack-module-packages.py --check with the stock image passes: 42 package comparisons are byte-identical and the separate USB Audio check passes. The first attempt exposed recipe fingerprints incorrectly carried over from the old whole-file scheme. Recomputing them with the unchanged current machine_inputs function fixed it; the other machine recipes now equal main. The failed run is retained in the local record.
  • The standalone recipe-pin test passes. test_requested_imports.py and test_runtime_card_shelf.py pass (5 tests); scripts/module-source.test.mjs and src/catalog/build-support.test.ts pass (10 tests). The card-shelf test is synthetic host evidence, not a hardware FAT or SAVE PROJECT test.
  • npm run module:doctor -- quantizer: red only on the module rules line, which waits for your approval record. The cost-at-rest line is green on 0.1.4's reading, not a new 0.1.5 measurement.
  • npm run pr:ready -- --author timhastie: its required local replay passed; the full check passed preparation, licences and machine profiles, then stopped at modules:check on the owner approval record. Later full-check stages did not run. It also requires owner review for this shared-file update. No stand-in approval record was used in this merge round.

Related to #1146

…es, 5 copies): package, recipe, catalogue, changelog, TESTING
@repeat98

Copy link
Copy Markdown
Owner

I checked the Analog BD question against this head. The builder hashes the whole shared machine-ports.json for Analog BD, and the base uses that hash when generating its controller policy. Changing the Quantizer entry therefore changes that policy input on 0.7.10 as well. Please leave the published base and its trust record alone in this module PR. The shared-builder decision and the 0.1.5 approval record belong with the maintainer.

For your MKI run, the case that would settle the two removed hooks is an upgrade from a kept 0.1.4 to package 092a8a13 on 0.7.10. Please check that both old hooks are restored, then check FOLLOW on audio and MIDI, Undo, and the saved settings after reboot. An install into an empty set cannot establish what happens to the old hooks.

# Conflicts:
#	scripts/module-source.test.mjs
#	sdk/machines/octatrack/module-adapters/machine-recipes.json
#	sdk/machines/octatrack/module-adapters/standalone-recipes.json
#	sdk/tests/test_requested_imports.py
#	src/catalog/build-support.test.ts
#	src/engine/assets/bootstrap-package.json
#	src/engine/assets/coldfire-packages.json
#	src/engine/assets/descriptor-recipes.json
#	src/engine/assets/dsp-packages.json
#	src/engine/assets/menu-recipes.json
#	src/engine/assets/module-build.json
#	src/engine/assets/platform-writes.json
#	src/engine/assets/requested-packages.json
#	src/engine/assets/resident-dsp.json
#	src/engine/assets/rom-packages.json
#	src/engine/assets/usb-audio-packages.json
#	src/engine/assets/utility-packages.json
# Conflicts:
#	sdk/machines/octatrack/module-adapters/standalone-recipes.json
#	src/engine/assets/bootstrap-package.json
#	src/engine/assets/coldfire-packages.json
#	src/engine/assets/descriptor-recipes.json
#	src/engine/assets/dsp-packages.json
#	src/engine/assets/menu-recipes.json
#	src/engine/assets/module-build.json
#	src/engine/assets/platform-writes.json
#	src/engine/assets/requested-packages.json
#	src/engine/assets/resident-dsp.json
#	src/engine/assets/rom-packages.json
#	src/engine/assets/usb-audio-packages.json
#	src/engine/assets/utility-packages.json
@timhastie
timhastie marked this pull request as ready for review November 21, 2026 10:17
@repeat98

Copy link
Copy Markdown
Owner

Thanks for recording the MKI upgrade, especially the two early runs where SCALE came back a step lower. Do you remember what the SCALE row showed immediately before SAVE PROJECT in either of those runs? That would help us reproduce the transition and tell whether it happened before saving or during save and reload. The shared builder and approval record are on the maintainer side. The hook and idle-cost readings still need the development base.

# Conflicts:
#	scripts/module-source.test.mjs
#	sdk/machines/octatrack/module-adapters/machine-recipes.json
#	sdk/machines/octatrack/module-adapters/standalone-recipes.json
#	src/engine/assets/bootstrap-package.json
#	src/engine/assets/coldfire-packages.json
#	src/engine/assets/descriptor-recipes.json
#	src/engine/assets/dsp-packages.json
#	src/engine/assets/menu-recipes.json
#	src/engine/assets/module-build.json
#	src/engine/assets/platform-writes.json
#	src/engine/assets/requested-packages.json
#	src/engine/assets/resident-dsp.json
#	src/engine/assets/rom-packages.json
#	src/engine/assets/usb-audio-packages.json
#	src/engine/assets/utility-packages.json
@timhastie

Copy link
Copy Markdown
Contributor Author

I remember selecting MAJOR in the first run and MINOR in the second. After SAVE PROJECT and the restart, they came back as OFF and MIXOLYD respectively. I did not photograph the SCALE row immediately before SAVE PROJECT, so I cannot verify its value at that exact point.

The later controlled runs kept the selected scale, including repeating the original trial, Undo, Keep and save sequence with the page left open and using only NO to leave it. I have not reproduced the one-step change again. The two old hook-site hashes and the new idle-cost reading are still unmeasured on the unit; they need the development base.

repeat98 and others added 3 commits November 24, 2026 10:04
module-build.json conflicted with Mute Modes 0.2.3: main's copy is taken, as
DEVELOPER_WORKFLOW.md says, and the isolated build and import regenerate it next.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The owner approved this exact source (931d9cd9...) on 24 November 2026, waiving the
current-build hardware run, chip worst-case cycles and complete memory bounds, with the
limits stated in the record.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Isolated build in the modwerk-source-tools image (compiler 0b303a1e, as main), imported
with --development: module-build.json now pins this branch with main's Mute Modes 0.2.3
rows and the regenerated requested-packages.json hash.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@repeat98
repeat98 enabled auto-merge November 24, 2026 09:08
@repeat98
repeat98 merged commit 15d6ccf into repeat98:main Nov 24, 2026
13 checks passed
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.

2 participants