Skip to content

FM Synth 0.1.3-experimental: much less CPU when installed on no track - #1504

Merged
repeat98 merged 16 commits into
mainfrom
module/fm-synth-0.1.3-release
Nov 14, 2026
Merged

repeat98 merged 16 commits into
mainfrom
module/fm-synth-0.1.3-release

Conversation

@repeat98

@repeat98 repeat98 commented Nov 13, 2026 •

Copy link
Copy Markdown
Owner

Module update: FM Synth 0.1.3-experimental: much cheaper while installed and on no track. No base change.

  • Change in behaviour:
    • The machine no longer declares RENDER_FLEX. Which tracks the engine must render is worked out once a frame (FM tracks that have started, sample tracks while GLIDE is on, a sample track a voice of FM Synth's is on or starts on), and the slot copy and the LFO depth site test one bit inline, so a stock track's frame does not enter FM Synth's code.
    • Sound and controls are meant to be unchanged.
    • Fixes track 1's LFO 3, which wrote into FM Synth's clock instead of its destination while FM Synth was installed (seen in the emulator, not heard on a unit). Likely related to [synth] LFO 3 stops working on FLEX and STATIC tracks while FM Synth is installed #932.
    • Release notes: src/community/module-changelogs/synth.json, 0.1.3.
  • Author: Tim Hastie gave the owner his OK for optimizations verbally (owner's word, 13 and 14 November 2026); there is no link.
  • Measured (owner's MKII, development twin 0277c5c5 of main, 14 November 2026, timed trials, FM Synth the only module):
    • Four FLEX tracks playing, FM Synth on no track: +3.2 points of the frame interrupt and +2.2 on the CPU meter. 0.1.2 cost +19.0 / +8.5 and the first 0.1.3 source +15.6. A build with every frame-interrupt site removed read 0.0; TESTING.md has the bisect.
    • One FM Synth track alone on T1, recorded over USB from the track's outputs: 0.1.3 correlates 0.99991 and 0.99990 with two takes of 0.1.2 over one bar; the two 0.1.2 takes correlate 0.99991 with each other.
    • A FLEX track playing beside an FM track is sample-identical between 0.1.2 and 0.1.3.
  • What remains at rest, about 3.2: the LFO pass's 24 entries a frame, FM Synth's clock, and the GLIDE and start-flag reads. Removing it needs the base to call a machine for its own tracks only.
  • Not tested on hardware: chords, glide, GLIDE on sample tracks, legacy FMSYNTH samples, MIDI, track 1's LFO 3, a reload or power cycle, listening by ear. The owner's approval record waives these for this exact source; the 0.1.2 captures are retained (the UI is unchanged).
  • Known and unchanged: one FM Synth track alone takes the frame interrupt to 62 to 70 %, and beside three FLEX loops the base's frame guard skipped renders on the FM track with both versions.
  • Package: 19e7e08c…, 30,498 bytes, 24 sites, stock-free, rebuilt identically by octatrack:module-packages -- --check. Card packages from the isolated build. The 0.1.2 package is deleted.
  • Also in this pull request: the import record sdk/imports/synth-fixes-273-264.json at 0.1.3, FM Synth's entry in the version roster of scripts/module-source.test.mjs, every machine recipe's pin of machine-ports.json, Tape Echo's and Euclid's asset pins, and FM Synth's quick-test binding on the download page.
  • What the guides lacked or got wrong (for a separate Docs: pull request): docs/MODULE_PERFORMANCE.md says to read the Part once a frame; even that, for all eight tracks, cost 2.2 to 2.5 points here, and declaring RENDER_FLEX put every unowned FLEX track through the base's guard (6.5 points on four tracks). The base registry's line for FM Synth in events.json / HOOKS.md ("render (also unowned FLEX tracks)") is now stale.
  • Validation: npm run pr:ready: Ready on current main (after Fix: FM Synth's release tests no longer ask for records only the removed card composer could make #1551). module:doctor -- synth green. Emulator probe against 0.1.2's fm_is_native, po_lfo3_depth and the dispatch rules: 1,508,128 checks, 0 failures.

🤖 Generated with Claude Code

repeat98 and others added 2 commits November 13, 2026 11:52
Brings the release back that left the base update (#1502): the module, its
catalogue and changelog rows, its package and the poly.s pin, as on
origin/module/fm-synth-0.1.3 (cb52118).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
POLY8, Scale Quantizer, VECTOR and Analog BD change only the pin of
machine-ports.json; FM Synth also its source, copies and image hash.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
repeat98 and others added 13 commits November 14, 2026 11:16
…cost

machine-recipes.json taken from main; FM Synth's recipe is recaptured with the change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Measured on the owner's MKII (twin 0277c5c5 of main, four FLEX tracks playing,
T5-T8 STATIC, FM Synth on no track): 0.1.2 cost 19.0 points of the frame
interrupt, the first 0.1.3 source 15.6, this one 3.2. A bisect of measurement
builds showed where: the base's guarded route for unowned FLEX tracks to a
RENDER_FLEX machine 6.5, the LFO depth site 2.8, sy_render's fast path 2.3, the
slot copy 2.2, and then reading the Part every frame 2.2-2.5.

The machine declares no RENDER_FLEX. fm_frame works out once a frame, from the
LFO pass's track 0 (before the packer), which tracks the engine must render: FM
tracks that have started, sample tracks while GLIDE is on, a legacy FMSYNTH*
voice, a sample track a voice starts on; it reads the Part only for those. The
slot copy and the LFO site test one bit of that line inline; the LFO site is a
jsr whose LFO 1 and 2 return within one line. FR_ON mirrors S_ON (sy_set,
po_kill). The STATIC entry stays sy_render so that the base retargets every
slot holding it when FM Synth leaves; the slot copy gives a STATIC track stock's
renderer back when it needs no engine.

Fixes track 1's LFO 3: the clock ran before the displaced lea and left a0 at
FM Synth's clock, so that LFO wrote there instead of its destination.

Emulator probe (scratch): 1,508,128 checks against fm_is_native,
po_lfo3_depth and the dispatch rules, 0 failures. Not heard on a unit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ain; re-pin Tape Echo's and Euclid's asset hashes

Built with scripts/build-modules-isolated.sh from ad69351 (image 28323550) and
imported with --development: synth's objects move to 0.1.3, every other module's
are unchanged. Tape Echo's and Euclid's standalone recipes pin the four asset
files that moved.

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

Generated files taken from main (POLY8 0.3.3); FM Synth's recipe, the recipe pins and the card packages follow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…pin of machine-ports.json after merging main

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ain; re-pin Tape Echo's and Euclid's asset hashes

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…and what is reasoned

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
…rated with the owner's approval

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

Recorded on the owner's MKII (twin 0277c5c5 of main, package 19e7e08c, timed
trials): one FM Synth track matches 0.1.2 as closely as two 0.1.2 takes do, a
FLEX track beside it is sample-identical. TESTING.md also says why 0.1.2's
composer-era release records are not renewed.

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

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…hooser, SRC, AMP and STOP steps unchanged)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sdk/imports/synth-fixes-273-264.json (the file name the release test reads, as
0.1.2's did): version 0.1.3, based on the 0.1.2 release commit, poly.s's new
hash and upstream/synth/manifest.py added, both chained to their vendored
originals. scripts/module-source.test.mjs: synth's roster entry is 0.1.3, as
each release moves its own (VECTOR 0.3.2, 3d903dc).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@repeat98 repeat98 changed the title FM Synth 0.1.3 (draft): cheaper on tracks that don't use it FM Synth 0.1.3-experimental: much less CPU when installed on no track Nov 14, 2026
@repeat98
repeat98 marked this pull request as ready for review November 14, 2026 12:10
@repeat98
repeat98 merged commit a378920 into main Nov 14, 2026
16 of 24 checks passed
@repeat98
repeat98 deleted the module/fm-synth-0.1.3-release branch November 25, 2026 12:59
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