pong
pong · gamesInteractive Pong game module (single-user research prototype). Two CV inputs (paddle_left / paddle_right) set each paddle's Y position; two gate outputs (score_left / score_right) fire one 5 ms pulse per scoring event, sample-accurate on the audio thread. The deterministic state stepper runs at visual cadence on the main thread (no audio worklet). Drive the paddles from LFOs / envelopes / joysticks and use the score gates as triggers — the game becomes a generative modulation source. Multiplayer is a planned additive follow-up (the design doc lays out the SyncedModuleDef path). See docs/design/game-modules.md.
the faceplate
2 inputs · 2 outputs · 4 params
inputs
| id | cable | what it does |
|---|---|---|
paddle_left | cv | Bipolar CV (−1..+1) setting the LEFT paddle's vertical position — −1 = top, 0 = center, +1 = bottom. Read at scheduler-tick rate (it's a continuous position, not a gate). Drive it with an LFO for an auto-rally, a sequencer for stepped jumps, or a JOYSTICK/MIDI CV to play by hand. control voltage (CV) |
paddle_right | cv | Bipolar CV (−1..+1) setting the RIGHT paddle's vertical position (−1 top, 0 center, +1 bottom). The opponent's paddle — drive it the same way as the left. control voltage (CV) |
outputs
| id | cable | what it does |
|---|---|---|
score_left | gate | Fires a 5 ms pulse each time the LEFT side scores (the ball passes the RIGHT paddle). A trigger you can route to a sound, counter, or scene change to sonify the rally's outcome. gate / trigger; trigger — fires once per rising edge |
score_right | gate | Fires a 5 ms pulse each time the RIGHT side scores (the ball passes the LEFT paddle). gate / trigger; trigger — fires once per rising edge |
params
| id | label | range | default | curve |
|---|---|---|---|---|
speed | Speed | 0.25..4 | 1 | log |
paddleH | Paddle | 0.05..0.5 | 0.2 | linear |
serveAngle | Serve | 0..1 | 0.3 | linear |
freeze | Freeze | 0..1 | 0 | linear |
controls
| control | what it does |
|---|---|
| Freeze | A determinism hold for visual regression capture, not a performance control — it is declared noUserControl, so no faceplate, Push encoder or group instrument bar offers it. At 0.5 and above the scheduler tick returns before stepping the game, so the ball, the paddles and the score all hold and the court repaints an identical frame; below 0.5 the game runs normally. Nothing in the product writes it except the VRT face-scene harness. |
| Paddle | Paddle height as a fraction of the court (0.05..0.5, default 0.2) — taller paddles are easier to defend with (longer rallies, fewer scores); shorter paddles miss more often. |
| Serve | Serve-angle variance (0..1, default 0.3) — how much the launch angle randomly varies on each serve. 0 = nearly flat, predictable serves; 1 = wide, steep, unpredictable serves. |
| Speed | Ball speed multiplier (0.25..4, log, default 1) — scales how fast the ball travels, so faster = quicker rallies and a denser stream of SCORE pulses. |
source
pong.ts on GitHub.