camera

cameraInput · sources

Webcam 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.

CAMERA is a webcam-as-source video module. It requests getUserMedia, runs a live <video> element, and hands it to the engine, which samples each decoded frame into a GPU texture and renders a fullscreen pass-through: the shader aspect-fits the camera frame into the engine's canvas (cover-cropping the off-axis by default so a 16:9 webcam fills the frame with no black bars), optionally flips it horizontally for a selfie mirror or vertically for an inverted camera, and multiplies the RGB by a gain before sending it downstream. When no frame is available, or while disabled/paused, it shows a dark navy idle pattern (a faint vertical gradient, brighter toward the top) rather than black, so an unconfigured CAMERA reads as alive. Usage: drop CAMERA in, pick a device and grant access, then patch OUT into any video module (mixer, effect, OUTPUT screen). Use it as the live face/scene layer of a video patch.

the faceplate

cameragaincvmirrorgateflipYgateoutvideoaudiocvgatepitch
3 inputs · 1 outputs · 5 params

inputs

idcablewhat it does
gaincvCV 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)
mirrorgateGate 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)
flipYgateGate 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

idcablewhat it does
outvideoVideo 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

idlabelrangedefaultcurve
gainGain0..2—linear
enabledOn0..1—discrete
mirrorMirror0..1—discrete
flipYFlip Y0..1—discrete
fillModeFill0..1—discrete

controls

controlwhat it does
OnOn (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.
FillFill (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 YFlip 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.
GainGain (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.
MirrorMirror (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.

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