videovarispeed

videovarispeed · sources · schema v1

Local-file VIDEO player with a PERFORMANT varispeed transport AND a 7-SLOT ASSET SELECTOR. SINGLE VIDEO: pick/drop a video (objectUrl + optional FileSystemFileHandle for one-click reload; collaborators re-link their own copy — the bytes stay local, only fileMeta syncs); the frame texture is sampled off requestVideoFrameCallback so the `video` output streams at ANY playback speed (the #291 fix). Transport: SPEED knob (0=-4×…0.5=+1×…1=+4×; reverse scrubs at a throttled ~10 Hz), a START/END window, LOOP vs ONE-SHOT, and rising-edge gates START / PAUSE / RESET / LOOP. Stereo `audio_l` / `audio_r` bridge the file's audio (with a silent keep-alive so an unpatched source keeps decoding at full rate). ASSET SELECTOR: right-click the card → "Load multiple…", a 7-row panel (notes C D E F G A B) that loads up to 7 videos, one per slot; all 7 are PRELOADED as separate <video> elements (first frame decoded) so a switch is instant. Patch a clip player's GATE → ASSET GATE and PITCH → ASSET PITCH: on each ASSET GATE rising edge the module reads ASSET PITCH (raw V/oct), maps it to a slot by PITCH CLASS, and — if that slot holds a loaded video — makes it the active source, RESTARTS IT FROM THE BEGINNING (currentTime=0), plays it (if the transport is playing) under the current speed/window/loop settings, and re-wires its audio to the now-active element. THE 7-NOTE → SLOT TABLE (the default clip's in-key rows, C-major from C3): C3 (MIDI 48) → slot 1, D3 (50) → slot 2, E3 (52) → slot 3, F3 (53) → slot 4, G3 (55) → slot 5, A3 (57) → slot 6, B3 (59) → slot 7. Matching is octave-independent (a C in any octave → slot 1, …); a black-key pitch (C# D# F# G# A#) maps to NO slot → the event is IGNORED (current video keeps playing). MEMORY: 7 preloaded <video> elements are heavy, so each slot's file is capped at 100 MB. The displayed selection is LOCAL render state (computed from the synced gate + per-slot fileMeta), never written to the Y.Doc per gate event. ASSET PITCH / ASSET GATE + the transport gates/CV all live in the card's yellow drill-down PATCH PANEL (no raw side jacks, #767 standard).

A local-file video player with a performant varispeed transport. Drop or pick a video and it decodes into the VIDEO output (rVFC-driven, so the texture streams at ANY speed without freezing). The SPEED knob is an asymmetric analog-clock face: full-left = -4x (reverse), 12 o'clock = +1x normal, full-right = +4x — forward speeds drive native <video>.playbackRate (audio pitch/tempo-shifts like tape varispeed) while reverse scrubs currentTime at a throttled ~10 Hz (audio muted in reverse). START/END sliders carve a play window into the clip; at the END edge LOOP jumps back to START while ONE-SHOT stops. The source aspect is letterboxed/pillarboxed into the 4:3 FBO so clips never stretch. DOM-only buttons (not patch params) handle file loading and transport: "Choose video…" / drag-drop / Chromium re-link, Play/Pause, a seek scrubber, and a LOOP↔1-SHOT toggle. Right-click the card to open the "Load multiple…" panel — up to 7 preloaded slots mapped to the C-major scale rows C..B; a clip player or any pitch+gate source can then switch which clip plays via the ASSET ports, each slot running its own virtual playhead so a switch jumps to that clip's live, de-synced position. Use it to scratch, reverse, freeze, and loop-window a clip live, or as a 7-clip melodic video switcher feeding BENTBOX / a CRT chain.

the faceplate

videovarispeedcv_startgatecv_pausegatecv_resetgatecv_loop_togglegateasset_pitchpitchasset_gategatespeedCvcvstartCvcvendCvcvvideovideoaudio_laudioaudio_raudioaudiocvgatepitch
9 inputs · 3 outputs · 12 params

inputs

idcablewhat it does
cv_startgateGate (rising-edge / trigger). On the edge it (re)starts playback from the START window point and begins playing; if the window is empty (START past END) it instead seeks the current spot and stays paused.
gate / trigger; modulates cv_start (summed directly (the destination DSP scales it))
cv_pausegateGate (rising-edge / trigger). Each rising edge toggles pause/unpause — it flips the play state on the edge, it is not level-held.
gate / trigger; modulates cv_pause (summed directly (the destination DSP scales it))
cv_resetgateGate (rising-edge / trigger). On the edge it seeks the playhead back to the START point (or 0 if there is no valid window) without changing play/pause state.
gate / trigger; modulates cv_reset (summed directly (the destination DSP scales it))
cv_loop_togglegateGate (rising-edge / trigger). Each rising edge flips the transport between LOOP (jump to START at END) and ONE-SHOT (stop at END), the same state the LOOP button shows.
gate / trigger; modulates cv_loop_toggle (summed directly (the destination DSP scales it))
asset_pitchpitchPitch (raw V/oct passthrough, no cvScale). Selects which of 7 asset slots plays: pitch class C=slot1 D E F G A B=slot7 (octave-independent); a black-key class selects no slot. Read on each ASSET GATE rising edge.
V/oct pitch CV; modulates asset_pitch (summed directly (the destination DSP scales it))
asset_gategateGate (rising-edge / trigger). On the edge it reads ASSET PITCH, maps it to a slot, and if that slot holds a loaded video makes it the active source — jumping the output to that slot's live virtual position (re-triggering the already-active slot restarts it from the window start). Empty or out-of-key selections are ignored.
gate / trigger; modulates asset_gate (summed directly (the destination DSP scales it))
speedCvcvCV (bipolar -1..+1, modulates Speed). Sums into the SPEED knob position before the varispeed map, so +-1 sweeps the full reverse-to-forward span centred on the knob setting.
control voltage (CV); modulates speedCv (additive offset — ±1 CV sweeps the full range, centered on the knob)
startCvcvCV (bipolar -1..+1, modulates Start). Sums into the START slider only while patched (unpatched normals to 0), shifting the window's start/reset point earlier or later.
control voltage (CV); modulates startCv (additive offset — ±1 CV sweeps the full range, centered on the knob)
endCvcvCV (bipolar -1..+1, modulates End). Sums into the END slider only while patched (unpatched normals to full duration); negative CV pulls the window's end point earlier.
control voltage (CV); modulates endCv (additive offset — ±1 CV sweeps the full range, centered on the knob)

outputs

idcablewhat it does
videovideoVideo. The decoded clip at the current transport state (speed, scrub, window), aspect-preserved (letterbox/pillarbox) into the engine FBO; an idle dark gradient before a file loads.
RGB video stream
audio_laudioAudio (left). Left channel of the ACTIVE slot's audio, tapped from its media-element source; varispeed pitch/tempo-shifts it on forward play and it is muted during reverse.
audio signal
audio_raudioAudio (right). Right channel of the active slot's audio, following the same active slot as audio_l and re-pointed automatically when the asset slot switches.
audio signal

params

idlabelrangedefaultcurve
speedSpeed0..1linear
startStart0..1linear
endEnd0..1linear
speedCvSpeed CV-1..10linear
startCvStart CV-1..10linear
endCvEnd CV-1..10linear
cv_startStart gate0..10linear
cv_pausePause gate0..10linear
cv_resetReset gate0..10linear
cv_loop_toggleLoop gate0..10linear
asset_pitchAsset pitch-10..100linear
asset_gateAsset gate0..10linear

controls

controlwhat it does
Asset gateSynthetic Asset-gate cache (0..1, default 0). Holds the asset_gate level the card edge-detects to trigger a slot switch; not shown on the card UI.
Asset pitchSynthetic Asset-pitch cache (raw V/oct, default 0, range -10..10). Holds the raw asset_pitch value the card reads on each asset-gate edge to pick a slot; not shown on the card UI.
Loop gateSynthetic Loop-gate cache (0..1, default 0). Holds the cv_loop_toggle gate level the card edge-detects to flip LOOP vs ONE-SHOT; not shown on the card UI.
Pause gateSynthetic Pause-gate cache (0..1, default 0). Holds the cv_pause gate level the card edge-detects to toggle pause/unpause; not shown on the card UI.
Reset gateSynthetic Reset-gate cache (0..1, default 0). Holds the cv_reset gate level the card edge-detects to seek to START; not shown on the card UI.
Start gateSynthetic Start-gate cache (0..1, default 0). Holds the cv_start gate level the card polls and edge-detects to fire a window-start restart; not shown on the card UI.
EndEnd slider (0..1 of duration, default 1). The end of the playback window; if START passes END the window is empty and playback halts. Summed with End CV when patched (unpatched normals to full duration).
End CVCached End CV value (-1..+1, default 0). Holds the live bipolar sample from the endCv input, summed into the END slider only while patched; not a user-facing control.
SpeedSpeed knob (0..1, default 0.5). Asymmetric varispeed: 0 = -4x reverse, 0.5 = +1x normal forward, 1 = +4x; readout shows the live multiplier. Summed with Speed CV.
Speed CVCached Speed CV value (-1..+1, default 0). Holds the live bipolar sample from the speedCv input, summed into the SPEED knob; not a user-facing control.
StartStart slider (0..1 of duration, default 0). The play-from and reset-to point of the playback window. Summed with Start CV when patched.
Start CVCached Start CV value (-1..+1, default 0). Holds the live bipolar sample from the startCv input, summed into the START slider while patched; not a user-facing control.

source

videovarispeed.ts on GitHub.

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