camera
cameraInput · sourcesWebcam input (LOCAL ONLY). Live <video> -> WebGL2 texture; gain / mirror / on params. The captured stream is local to your browser tab and is NOT sent to other rack-mates — collaborators see a presence badge ("user X has CAMERA active") via Y-awareness, not the video itself. Multiplayer streaming (WebRTC + SFU) is deferred to a future phase.
the faceplate
3 inputs · 1 outputs · 5 params
inputs
| id | cable | what it does |
|---|---|---|
gain | cv | CV input that modulates the Gain control (linear scale, paramTarget=gain). Patch an LFO or envelope here to pulse the camera's RGB brightness; combines with the Gain control. control voltage (CV); modulates gain (additive offset — ±1 CV sweeps the full range, centered on the knob) |
mirror | gate | Gate input that drives the Mirror toggle. It is level-sensitive (edge: gate): the image is horizontally flipped while the level is held high (above 0.5) and un-flipped while low, so an LFO/clock/gate flips the mirror in time. With nothing patched, the Mirror control owns the state. gate / trigger; modulates mirror (summed directly (the destination DSP scales it)); gate — acts while the level is high (reacts to both edges) |
flipY | gate | Gate input that drives Flip Y. The frame is vertically flipped while the level is held high (above 0.5) and upright while low. With nothing patched, the Flip Y control owns the state, independently of Mirror. gate / trigger; modulates flipY (summed directly (the destination DSP scales it)); gate — acts while the level is high (reacts to both edges) |
outputs
| id | cable | what it does |
|---|---|---|
out | video | Video output carrying the live camera frame: aspect-fitted, optionally flipped on either axis, gain-multiplied RGB. Patch into any downstream video module. RGB video stream |
params
| id | label | range | default | curve |
|---|---|---|---|---|
gain | Gain | 0..2 | — | linear |
enabled | On | 0..1 | — | discrete |
mirror | Mirror | 0..1 | — | discrete |
flipY | Flip Y | 0..1 | — | discrete |
fillMode | Fill | 0..1 | — | discrete |
controls
| control | what it does |
|---|---|
| On | On (discrete 0/1, default 1 = on). Off (Pause) stops the camera track to release the hardware and renders the idle navy pattern; on (Resume) re-requests the stream. The PARAM owns that, not any one button — the faceplate's ON cell, the topbar camera manager and a collaborator's toggle all reach the hardware identically, because the capture acts on the value rather than on the click. |
| Fill | Fill (discrete 0/1, default 1 = fill). Aspect-fit mode set by the Fit toggle: 1 = Fill/cover-crop (fills the canvas, crops the off-axis, no bars), 0 = Letterbox/contain (fits the whole frame with black bars). Neither ever distorts the source aspect; when the source already matches the output aspect a non-interactive Native badge is shown instead. |
| Flip Y | Flip Y (discrete 0/1, default 0 = off). Vertically flips the camera frame without changing its horizontal orientation. Use it for an upside-down camera, or combine it with Mirror to flip both axes. The setting is saved with the patch and shared across collaborators; the flipY gate input can drive it while held high. |
| Gain | Gain (linear, 0 to 2, default 1). RGB multiplier applied to the camera frame in the shader (src.rgb * gain, unclamped): 0 = black, 1 = unity, 2 = doubled (bright/clipped) RGB. CV-modulatable via the gain input. |
| Mirror | Mirror (discrete 0/1, default 1 = on). Horizontally flips the frame for a selfie mirror (shader thresholds uMirror at 0.5). Settable from the Mirror control or held high by the mirror gate input. The param is shared across collaborators. |
source
camera-input.ts on GitHub.