modtris

modtris · games · schema v1

Interactive Tetris-clone game module (single-user research prototype). Five gate inputs (rotate_l / rotate_r / drop_fast / move_l / move_r) are rising-edge triggered to play the game; two gate outputs fire one 5 ms pulse per event — line_cleared (a Tetris emits four separate staggered pulses, one per line) and overfill (game over). Game logic runs at visual cadence on the main thread (no audio worklet), with a deterministic, tested state stepper. Patch a sequencer or controller into the inputs and route the cleared-line / overfill gates as triggers, turning gameplay into a modulation source. See docs/design/game-modules.md.

A playable Tetris-style block-stacking game wrapped as a CV/gate module — the falling-block gameplay drives the patch. Pieces drop into a 10×20 well at a tempo you set (DROP); you steer and rotate them with five gate inputs, and the game emits gate pulses on the events it produces: every line cleared and an overfill (game over). So a sequencer or clock pattern playing the game becomes a generative trigger source whose rhythm follows the stacking — a four-line 'Tetris' fires four separate LINE pulses in quick succession. You play entirely over the patch (the card just shows the well + next-piece preview on a 2D canvas); since the module is vizPassthrough, that canvas can be portaled into a containing GROUP card for cross-domain video. DROP sets the gravity tempo and LVL sets how many cleared lines bump the difficulty.

the faceplate

modtrisrotate_lgaterotate_rgatedrop_fastgatemove_lgatemove_rgateline_clearedgateoverfillgateaudiocvgatepitch
5 inputs · 2 outputs · 2 params

inputs

idcablewhat it does
rotate_lgateRotate the current piece counter-clockwise on each rising edge — one quarter-turn per pulse (acts on the leading edge only, so a held gate rotates once).
gate / trigger
rotate_rgateRotate the current piece clockwise on each rising edge — one quarter-turn per pulse.
gate / trigger
drop_fastgateHard/fast-drop the current piece on each rising edge — slams it down a step (or to the bottom) per pulse, locking it sooner.
gate / trigger
move_lgateMove the current piece one column LEFT on each rising edge — one cell per pulse.
gate / trigger
move_rgateMove the current piece one column RIGHT on each rising edge — one cell per pulse.
gate / trigger

outputs

idcablewhat it does
line_clearedgateFires a 5 ms pulse for each line cleared — a single clear is one pulse, a Tetris (four lines at once) emits FOUR distinct staggered pulses so a downstream counter or envelope sees each line. Patch into a drum/envelope trigger to sonify clears.
gate / trigger
overfillgateFires a single 5 ms pulse when the well overfills (a piece locks above the top = game over). Use it as an end-of-run trigger — fire a sound, reset a scene, or restart another module.
gate / trigger

params

idlabelrangedefaultcurve
gravityBpmDrop30..24060log
levelStepLvl1..2010linear

controls

controlwhat it does
DropDROP gravity tempo in BPM (30..240, log, default 60) — how fast pieces fall on their own. Higher = faster, more frantic stacking (and a denser stream of LINE/OVERFILL pulses).
LvlLVL threshold (1..20, default 10) — how many cleared lines it takes to advance a level and ramp the difficulty (gravity speeds up each level). Lower = a steeper difficulty curve.

source

modtris.ts on GitHub.

Generated from packages/web/src/lib/{audio,video}/module-registry.ts · repo