Repository navigation
Signal routing: define a synth's wiring and work out its live path, with Model D's (t-141) - #113
Merged
Merged
Conversation
…l D's (t-141) Routing types in the contract, a pure routingState() that lights the path the patch takes, routingProblems() to hold a routing to its definition, and Model D's routing projected by hand from its spec. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A block was live whenever a live path ran from it to the output, whatever reached it, so Model D's mod bus and its lines to the filter stayed lit when MOD MIX left both sources under the engine's floor, and the mixer stayed lit with every channel off. A block marked `passes` (it makes no signal of its own) is now live only while a live edge or cable from a block with signal feeds it, and routingProblems refuses one that nothing could feed. Also shares WHEEL and the show/when condition test from patch.ts, reads cable jack ids through a null-prototype map, and covers the validation's remaining refusals. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The data and logic behind the routing view (the view itself is a later task — nothing in
app/orcomponents/uses this yet).SynthRouting(lib/app/synths/contract.ts): a synth's blocks, the edges between them (with the switches, levels and normals that decide when each carries signal), and which block each jack belongs to. Kept beside the definition inlib/app/synths/routing/<id>.ts, registered inSYNTH_ROUTINGS.routing/model-d.ts), projected by hand from its spec; the mod bus's crossfade and depth followtoEngine(), so edges go dark at the engine's floor.routingState()(lib/routing.ts): which blocks, edges and cables the current patch uses. Pure. A block markedpasses(a mixer, the mod bus) is live only while something live feeds it — so the mod bus and its lines out go dark when MOD MIX leaves both sources under the floor, and the mixer does with every channel off.routingProblems(): holds each routing to its definition and spec; a test runs it over every registered routing..context/app/synths.md, and a step in the new-synth recipe.Testing
tests/unit/lib/app/synths/lib/routing.test.tsandtests/unit/lib/app/synths/routing.test.ts— 35 passing.🤖 Generated with Claude Code