deck

Player scope

What belongs in the playback package, and what has to stay upstream.

The host side of .deck — Web Audio playback for programs parsed by @spacedevin/deck.

Entry: src/index.tish

This package exists so that playback never enters the language package. The root AGENTS.md lists "Audio / Web Audio engines" as out of scope for @spacedevin/deck, and that stands: ../../src/ stays audio-free. Everything that rule excludes lives here.

In scope

Out of scope — do not add here

Generators

Ported from Deckard (tish-midi/src/generators/), which is the reference host. The port is source-level: those modules are already Tish and already pure (play*(ctx, bus, t, midi, vel, durSec, ch, bendSemis)), so a fidelity difference is a porting bug, not a design choice.

Tier Generators State
1 gameBoyDmg, gbaDirectSound, basicOsc ported
2 the other node-graph voices (chiptune, nes2a03, c64sid, ym2612, sn76489, spc700, noiseBurst, fmTone, pad, bell, drumSynth, …) not yet ported
3 patch, matrixFm — need the gen_block graph parsers + the sync worklet not yet ported
ttsVocal, meSpeakVocal excluded: Web Speech API / mespeak dependency

Anything unported falls back to basicOsc so a song still plays; unsupportedGenerators() reports what was substituted.

Why element/ is not Tish

element/deck-player-element.js is hand-written JavaScript, shipped as authored. A custom element must be class X extends HTMLElement, and Tish has no class syntaxtish build parses the declaration as an identifier expression and emits JS that doesn't parse. Everything with behaviour stays in src/*.tish; that file is only the DOM shell around it. Don't try to move it back.

Notes for editors