Skip to content

Make each modular module glow with its own signal (t-149) - #121

Merged
JohnD-EE merged 3 commits into
mainfrom
feature/t149-module-glow
Oct 30, 2026
Merged

JohnD-EE merged 3 commits into
mainfrom
feature/t149-module-glow

Conversation

@JohnD-EE

Copy link
Copy Markdown
Contributor

What changed

On a System 15, 35 or 55 the routing view lit the whole patched line with the output's level (t-148), so three oscillators at different pitches, or two envelopes on different contours, all glowed alike. Now each module glows with its own signal:

  • Engine. moog-core.ts gains meters(), which reports every slot: each 921/921B's wave (its sine, −1..1) and pitch, each 911's level (0..1 of its +6 V peak) and each 902's gain. It reports in place into the same reused arrays, so the meter message makes no garbage. dsp-core.ts carries it on the meter message as moog, and it flows through toStores and Meters to the routing view.
  • Routing. moog900Routing() gives each 921, 911 and 902 block a ModuleMeter (vco:3, env:2, amp:1). The slot is read off the module's output jack signal (v3sin, e2, a1p), because slots are numbered in build order, not by the module's own number.
  • Activity. routingActivity() lights such a block from its own slot using the existing wave/blur rules. A 921 at LO pulses with its own wave, and at audio pitch it glows steadily at the output's level. A 911 follows its envelope. A 902 on the audio line follows its gain, bounded by the output. Until the engine reports, a module falls back to the t-148 rule.

Why this shape

  • The whole set every time, not only the patched modules. A System 55 has 7 oscillator, 4 envelope and 5 amplifier slots: 23 numbers in reused arrays, 25 times a second. That is cheap enough that filtering to the patch isn't worth it. Unused slots read 0.
  • A 902 off the audio line falls back to what feeds it, not its gain (review round 1). A gain says how much would pass, not that anything reaches it, so a 902 at a fixed 6 V would glow full with silent inputs.

Deliberately not done

  • At audio pitch a 921 glows steadily at the output's level whatever its role. That is the existing rule for oscillators too fast to draw, so an FM modulator and its carrier glow alike until they slow to LO.
  • The 921A drivers, the 960 and the filters keep their t-148 rules.

Checks

  • New moog-core.test.ts: two 921Bs at about 1 Hz and 2 Hz report different waves and pitches; two 911s on different attacks report different levels; a 902's gain is reported; an unused slot reads 0.
  • routing-activity.test.ts: two patched LO oscillators glow differently, as do two envelopes; plus the 902 rules. These fail with the routing-activity change reverted (checked). The wired synths' tests are unchanged.
  • dsp-core.test.ts: the meter message carries moog.
  • Type-check, ESLint and Prettier on the changed files; coverage of the changed lib files is 84–100%.
  • The scoped run (158 tests selected) hit 18 timeouts and knock-on failures under load. All 7 affected files pass on their own (362 tests).
  • Security review: no findings.
  • npm run build:audio-workers was run. The bundle is gitignored (public/worklets/), so there is nothing to commit.

Not yet checked by eye. That is the owner's check, batched with the others.

🤖 Generated with Claude Code

JohnD-EE and others added 3 commits October 30, 2026 15:20
…ck from it (t-149)

The 900 engine now reports, 25 times a second, each 921's wave and pitch,
each 911's level and each 902's gain (MoogMeters), carried on the meter
message as `moog`. The routing gives each 921/911/902 block a meter for its
own slot, read off its output jack's signal name since slots are numbered
in build order. routingActivity() lights the block from it with the wave /
blur rules, a 902 never brighter than the output it carries; with no
reading yet it falls back to the output's level as before.

The full set is 23 numbers in reused arrays, so it is reported whole rather
than filtered to the patched modules.

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

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

Review round 1: a 902's gain says how much it would let through, not that
anything reaches it, so off the audio line a 902 at a fixed 6 V glowed
full with silent inputs. Off the line it now falls back to the brightest
live line into it, as a pass-through block does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JohnD-EE
JohnD-EE merged commit 86bd092 into main Oct 30, 2026
19 checks passed
@JohnD-EE
JohnD-EE deleted the feature/t149-module-glow branch October 30, 2026 16:12
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