Skip to content

SYNTIZ 0.1.1-experimental: cheaper on the ColdFire while it plays - #1978

Merged
repeat98 merged 10 commits into
mainfrom
module/syntiz-0.1.1
Nov 24, 2026
Merged

repeat98 merged 10 commits into
mainfrom
module/syntiz-0.1.1

Conversation

@repeat98

@repeat98 repeat98 commented Nov 22, 2026 •

Copy link
Copy Markdown
Owner

SYNTIZ 0.1.1-experimental (module syntiz; author stigmagit, whose engine, tables and credit this keeps): the same samples as 0.1.0, bit for bit, with less ColdFire work in every frame while a track plays.

Author's OK: owner waiver, 22 November 2026 (the owner waived the ask-the-author step for this optimization work).

Why

On the owner's MKII (OS 1.40C, development twin of base 0.7.14 b36f9c53e, Dev17 pattern C01 at 126 BPM, trigs on steps 1/5/9/13 of T1-T8, a big set installed), the frame interrupt took 50.7 % of each frame with every track STATIC and 65.2 % with one SYNTIZ 0.1.0 track on T2: +14.5 points, the dearest machine a track, and 24 renders dropped in 8 s (the owner's session's figures). The base's admission now judges picks by frame share against a 50 % line, so this decides whether a musician can pick SYNTIZ at all. 0.1.0's own record found about 2.5 cycles an instruction warm and up to 8.8 cold, so stack traffic and the code fetched each frame matter as much as the instruction count.

What changes

  • Work per change, not per frame. What depends only on the controls and the pitch (increments, detunes, chord ratios, gains, MORPH's crushes and crossfade step, the subs' fade-in, and the divides among them) moves into wave_prepare. machine.c keeps each track's controls under a key of its raw bytes (model, PTCH, SRC B-F, SETUP A-F) and calls it only when the key changes. A lock, an LFO or a scene that moves a byte works it out again that frame, so nothing about modulation changes.
  • One short loop per oscillator, then one for the output stage. The saw, each detuned pair, each chord note and the subs each sum into the packer's L longs in their own loop, then the output stage runs over the block in place. 0.1.0 ran every oscillator and the output stage in one loop, which spilled its state to the stack every sample. The output stage now writes the L and R longs itself (the glue's copy loop is gone), silent subs only move their phases on, and the saw's test for its fall is one compare (p + inc < 2 inc, exact for the audible increments that reach it).
  • API: engine.h adds wave_prepare and wave_play; wave_render stays for the host tests. A block is at most 16 samples (it said 64; nothing called it with more).
  • Tools: tools/cf_probe.py with cf_probe.cpp runs the linked image's wave_render_track on upstream ot_emu's V4e core against a synthetic stock environment (no stock byte). It counts instructions, memory operands and touched code, and compares two versions' samples. tools/render_matrix.c is the host comparison.
  • Release shape: version 0.1.1-experimental in the manifest and catalogue, changelog entry, package row, TESTING.md section, README, regenerated module documents. The 0.1.0 package is removed. The manifest drops 0.1.0's tests.qualification (it covered package f501a6a4 only), marks the hardware untested and names the new package's static memory. evidence/performance.json stays 0.1.0's until this package is measured.

Not done: the output stage (emphasis, the curve's antiderivative, a divide a sample from about C3 up, the DC blocker) is still about 82 instructions a sample, 1,305 of SAW's 1,773. A hand count of the same steps in ColdFire assembly came to about as many, and the divide is what keeps the output bit-exact, so it stays.

The package

public/octatrack-modules/syntiz/0.1.1-experimental.mwrm, 46,944 bytes, SHA-256 c3a97ecc50c92b305a45fcd6cf75d3f48a194538891c5398eedfa5f3aad39df5, module 970f03ad, abi 8, no stock sites. 46,008 bytes of code and data and 20,644 of bss (0.1.0: 53,500 and 19,804); the engine's code fell from about 16 KB to 8,360 bytes.

Counts (emulator, not cycles)

python3 -B tools/cf_probe.py count against count origin/main: one track at C3, the mean of 63 frames, each a [0,0) and a [0,16) call. Allowance weighs each instruction with Grain's zero-wait allowances (memory operand 12, register 4, multiply 16, divide 48): a yardstick, not cycles.

Model Settings Instructions a frame Memory operands Code bytes touched Allowance
SAW defaults 2,436 → 1,773 (−27 %) 492 → 205 2,208 → 1,312 18,431 → 12,400
SAW heavy 4,717 → 3,779 1,100 → 428 3,504 → 2,544 34,690 → 25,039
PULSE defaults 3,125 → 2,268 671 → 219 2,624 → 1,696 22,750 → 14,612
ENS heavy 6,854 → 5,943 1,456 → 710 3,632 → 2,832 49,947 → 39,077
TABLE defaults 2,629 → 1,967 647 → 268 2,160 → 1,376 20,514 → 13,983
MORPH defaults 2,659 → 2,106 563 → 350 2,064 → 1,456 19,987 → 15,064
CHOIR defaults 3,761 → 2,872 1,042 → 462 2,800 → 1,904 29,630 → 20,333

The full table, heavy settings included, is in TESTING.md. MORPH heavy changes WAV1 every frame, so it re-prepares every frame and touches more code than 0.1.0 (2,528 → 2,848 bytes), with fewer instructions (3,685 → 3,509).

How I checked it

  • python3 -B tools/cf_probe.py host origin/main: 5,845,711 samples from tools/render_matrix.c identical to 0.1.0's engine. The matrix is every model at every control extreme over every third note in blocks of 1-16, then 3,000 random walks moving controls, models and pitch, with trigs. Both builds ran under UBSan/ASan with no report.

  • python3 -B tools/cf_probe.py compare origin/main: 300 random two-track scenarios of 600 frames through wave_render_track on the emulated ColdFire, with model changes, moving knobs and PTCH, out-of-range SETUP bytes, trigs with RTRG and frames split at every offset. 2,880,000 samples identical, callee-saved registers and cursor as before.

  • python3 -B sdk/octatrack/modules/syntiz/verify.py: host checks pass, package rebuilt byte for byte (c3a97ecc…).

  • node scripts/mirror-octatrack-modules.mjs && python3 -B scripts/octatrack-module-packages.py: rebuilt the package above.

  • -fstack-usage: the render path's deepest chain is about 300 bytes against about 380 for 0.1.0.

  • npm run module:doctor -- syntiz (24 November, after the owner's approval record): red only on performance, since performance.json is still 0.1.0's; this version's cost is in evidence/frame-cost.json. The qualification test now lists SYNTIZ among the owner-approved updates.

  • npm run pr:ready -- --draft on the pushed commit: every step passes (modules:check and modules:generate warn "release evidence still to come": the UI captures and the owner's approval for this version; sdk:check rebuilds the packages) except test. Five tests pin SYNTIZ's published 0.1.0 evidence and fail for any new version until it is measured; I did not edit them:

    • ModuleCaution.test.ts (the High CPU badge);
    • resource-indicators.test.ts, twice (the 8.5 % measured active load bound to f501a6a4, and "needs tests.qualification");
    • module-qualification.test.ts (expects SYNTIZ qualified);
    • module-doctor.test.mjs (performance.json is 0.1.0's).

    The open POLY8, Tape Echo and FM Synth update drafts are red in CI's suites the same way. Which route 0.1.1 takes, a fresh qualification from your run or an owner-approved update, decides what changes there.

Not run: an ot_emu trial through the base (the glue's lifecycle code is unchanged and the comparison runs the real render entry), and the isolated Docker build (Docker's daemon does not start on this computer).

Tested on a unit: the #2043 cost procedure on the owner's MKII, base 0.8 development twin 678843cc, Dev17 C04 at 126 BPM (23 November 2026, evidence/frame-cost.json): the first copy costs 18.6 points (0.1.0: 27.5), each further copy 5.5; admitted on an empty pattern at 56.0 % and on a medium one at 95.4 % of the frame, no render dropped, no stall. On that busy scene a second copy already reads 105.6 % and four copies 112.4 %. Not run on this build: the test procedure's screenshots, the MAIN/CUE recording and a listening check, the flashed base and an MKI; the owner waived those in the approval record (24 November 2026), keeping 0.1.0's UI captures.

What to measure on the unit

The 0.1.0 scene: the same twin and set, Dev17 C01 at 126 BPM, T2 SYNTIZ at its defaults (SAW, PTCH 64). Read the frame interrupt's share and the guard's skips over 8 s (npm run device -- do guard), against 65.2 % and 24 with 0.1.0 (50.7 % all STATIC). Then T2 with a heavy SAW (DET 40, UNI 127, WIDE 90, SUB and SUB2 90) and a heavy ENS (three chord notes, SHAP 32, CHOR 100, both subs 90), and a knob under an LFO, which re-prepares every frame. The samples are bit-identical to 0.1.0 by construction and in both comparisons; a null test by recording needs both versions' oscillators to start at the same frame.

Edge cases

Case Why this change makes it a risk How run Result
A knob, PTCH or SETUP byte moving while a note plays (lock, LFO, scene) the held controls must be worked out again the same frame cf_probe.py compare: random SRC, SETUP and PTCH writes between frames pass (emulator)
Model changed while playing the key must name the model compare: signature byte changes pass (emulator)
A trig inside a frame, the render split at its offset two calls a frame, the second with RTRG compare: splits at every offset, RTRG on and off pass (emulator)
First render of a track after install the held key starts invalid, the reset must precede the first prepare every compare scenario starts from a fresh image pass (emulator)
SETUP bytes above 127, PTCH folding past the curve, notes past Nyquist or below the subs' floor prepared values for edge inputs and silent increments compare writes 0-255 into SETUP and 0-0xffff into PTCH; host random increments pass (emulator and host)
Part or bank change to a Part whose SYNTIZ track has the same bytes reuses the held controls not run as such: the key holds every input of the controls and the pitch (machine.c), and compare changes each of them not run: covered by the key's inputs
Frame-interrupt stack the render runs on the base's interrupt stack -fstack-usage over the render path pass: about 300 bytes against about 380
One SYNTIZ track playing, cost on the unit the point of the change the #2043 curve and admission on the 0.8 twin (Dev17 C04) pass: first copy 18.6 points (0.1.0: 27.5), each further 5.5; admitted empty 56.0 %, medium 95.4 %, nothing dropped
Three heavy SYNTIZ tracks with long notes the old crackle limit play them, read the guard's skips not run: unit
Sound against 0.1.0 on the unit must not change USB recording of the same steps not run: unit
Undo or removal while tracks use it lifecycle (unchanged code, new state) trial, then Undo not run: unit

What the guides lacked or got wrong, and where I fixed it

One gap, not fixed here: nothing in the guides tells a C machine's developer how to count its ColdFire work through its real glue on a computer without Docker. The module's count_cf.sh needs Docker's qemu, and its counts cover wave_render only. tools/cf_probe.py does it on upstream ot_emu's core, and a separate Docs: pull request can point docs/MODULE_PERFORMANCE.md at the pattern. None is opened, since a module release carries no guide edits.

🤖 Generated with Claude Code

repeat98 and others added 7 commits November 22, 2026 09:09
The same samples as 0.1.0, bit for bit, with less work a frame: what depends only on
the controls and the pitch is worked out when a track's bytes change, each oscillator
runs its own short loop into the packer's longs, then one loop for the output stage.

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

Measured with the release cost procedure (#2043) on a 0.8 development twin (678843cc), Dev17 C04, picks on C02:
first instance read at 97.7 % of a frame, admitted alone on the empty (56 %) and the medium pattern (95.4 %), no
render dropped, no stall. Published 0.1.0 on the same twin and scene: first 27.5 (read at 101.1 %, saturated).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds the owner's approval for SYNTIZ 0.1.1-experimental (source a354b178), waiving
current-build hardware, chip worst-case cycles and release documentation, keeping
0.1.0's UI captures, after the #2043 cost run on base 0.8 (first copy 18.6 points,
each further 5.5, admitted empty and medium). SYNTIZ now qualifies as an
owner-approved update, so the qualification test lists it with the others.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@repeat98
repeat98 marked this pull request as ready for review November 24, 2026 09:30
repeat98 and others added 2 commits November 24, 2026 10:52
…w the approval

evidence/performance.json now names 0.1.1-experimental. Its figures stay 0.1.0's and
its method text says so: 0.1.1 renders the same samples bit for bit in less ColdFire
time, so they bound it from above, and its own reading is evidence/frame-cost.json.
The approval's source hash follows the changed folder (39035e75), and a missing space
in its reason is fixed. The resource gauge test counts SYNTIZ's approval as the
qualification test already does, and no longer expects 0.1.0's 8.5 % active-load
gauge, which is bound to 0.1.0's package.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@repeat98
repeat98 enabled auto-merge November 24, 2026 10:12
@repeat98
repeat98 merged commit 470f568 into 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.

1 participant