Skip to content

feat(synths): ship @spacedevin/deck-synths from this repo - #23

Merged
spacedevin merged 1 commit into
mainfrom
feat/synths-package
Sep 1, 2026
Merged

feat(synths): ship @spacedevin/deck-synths from this repo#23
spacedevin merged 1 commit into
mainfrom
feat/synths-package

Conversation

@spacedevin

Copy link
Copy Markdown
Owner

The instrument catalog — 33 voices — is the third package in this ecosystem and the only one not released from here. This brings it in and wires it into the same lockstep release as the language and the player.

Why it matters beyond tidiness

It lived in the Deckard repo, so it built against @spacedevin/deck from npm while the player builds against the workspace root. Two copies of the language in one program means two dialect registries — and registerGenBlockDialect writes into a module-level let dialects = {}, one per copy.

The failure is silent. A gen_block matrix_fm dialect registered by the synths package is invisible to a song parsed by the player: generatorSpec.graph comes back empty, MatrixFm.tish falls back to a default tone, and you get a plain oscillator where you wrote a Supersaw Stack. No error, no substitution recorded.

Building both here collapses that — verified: a program combining them now inlines one copy of the language and one registry, where it previously inlined two.

Release wiring

Mirrors the player's exactly:

  • the licence gate covers packages/synths/LICENSE
  • a stamp-and-pack step rewrites file:../.. to the real version
  • the tarball is a release asset
  • npm-release.yml downloads and publishes it in dependency order — language, synths, player — since each one's dependency is pinned to that exact version at pack time

Before merging

npm trusted publishing is per package. @spacedevin/deck-synths needs its own publisher configured (org spacedevin, repo deck, workflow npm-release.yml, blank environment) or the new publish step fails on the first release.

Verified

tish build of packages/synths/src/index.tish succeeds in the workspace; npm pack -w @spacedevin/deck-synths produces a 47-file tarball; both workflows are valid YAML; existing suites unchanged — 8 language, 46 player.

Follow-up, not in this PR

Deckard should drop its copy and depend on the published package once this ships. And deck-player still carries its own three voices plus its own midiToHz; consolidating those onto this package is the change that finally lets a host import one catalog instead of two — it needs the voices retrofitted to the player's {stopTime, disconnects} cleanup contract first.

The instrument catalog is the third package in this ecosystem and the only one not
released from here. It lived in the Deckard repo, so it built against @spacedevin/deck
from npm while the player built against the workspace root — two copies of the language
in one program, and therefore two dialect registries. A gen_block dialect registered
against one is invisible to the other, which is why a matrixFm patch parsed by the synths
package never reached a song parsed by the player: the graph came back empty and the voice
fell back to a default tone, silently.

Building it here collapses that. Both packages now resolve the same workspace root, and a
program combining them inlines one language and one registry.

Release wiring, matching the player's exactly:
- the licence gate covers packages/synths/LICENSE
- a stamp-and-pack step rewrites file:../.. to the real version, same as the player
- the tarball is a release asset
- npm-release.yml downloads and publishes it, in dependency order: language, synths, player

Trusted publishing on npm is per package, so @spacedevin/deck-synths needs its own
publisher configured before the first release or that step will fail.

Verified: builds in the workspace, npm pack produces a 47-file tarball, both existing
suites unchanged (8 language, 46 player).
@spacedevin
spacedevin merged commit 88ed63b into main Sep 1, 2026
5 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