picturebox

picturebox · sources · schema v4

Image-file SOURCE with a 7-SLOT ASSET SELECTOR. Click "Choose image…" to load a single picture (downscaled to 1024×768, JPEG-encoded, base64 → node.data and synced to all rack-mates; each peer decodes it back into the WebGL2 source texture). A GAIN knob (CV-modulatable, 0..2) scales the output RGB; output `out` is a video-domain image source. ASSET SELECTOR: right-click the card to open "Load multiple…", a 7-row panel where each row is labelled with a note (C D E F G A B) and loads its own image into one of 7 slots (all 7 base64 images sync + all 7 textures stay resident in GPU memory). A clip player (or any pitch + gate source) then SWITCHES which slot is displayed: patch the clip player's GATE output → ASSET GATE and its PITCH output → ASSET PITCH. On each ASSET GATE rising edge the module reads ASSET PITCH (raw V/oct), maps it to a slot by PITCH CLASS (octave-independent), and instantly shows that slot if it holds an image. 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 by pitch class, so a C in ANY octave selects slot 1, a B in any octave selects slot 7, etc. A pitch whose class is a black key (C# D# F# G# A#) maps to NO slot → the event is IGNORED (the current image keeps showing). The displayed selection is LOCAL render state (every peer computes it from the same synced gate + synced images), so it is never written to the Y.Doc per gate event. ASSET PITCH/ASSET GATE + GAIN live in the card's yellow drill-down PATCH PANEL (no raw side jacks, #767 standard). Limits: 8 PICTUREBOX per workspace.

An image source for the video graph. You pick an image file in the card ("Choose image..."); a still is zoom-fit-cropped to the engine resolution (1024x768, 4:3), JPEG-encoded (q=0.85), and synced across rack-mates so every peer sees the same picture. An ANIMATED gif is kept byte-for-byte (not flattened) and PLAYS — its frames are decoded (WebCodecs ImageDecoder) and stepped on the engine clock, looping with the gif's own per-frame delays; the card preview animates too. Where ImageDecoder is unavailable it falls back to the first frame, and a gif over the sync size cap is stored as a first-frame still (the card hints why). The fragment shader samples the current frame's texture and multiplies its RGB by Gain (idle = a dark teal fill so an empty card reads as alive, not broken). Beyond the single image, picturebox holds a 7-slot asset bank: right-click the card to open the "Load multiple…" panel and load one image (or gif) per slot, labelled by the C-major scale degrees C D E F G A B (slots 1-7). Patch a clip player's note/pitch + gate into asset_pitch / asset_gate and each gate edge switches the displayed slot by pitch class (octave-independent; a black key is ignored). Use it as a still backdrop, an animated-gif loop, an album-art frame, or a note-triggered image sampler feeding downstream video benders.

the faceplate

pictureboxgaincvasset_pitchpitchasset_gategateoutimageaudiocvgatepitch
3 inputs · 1 outputs · 3 params

inputs

idcablewhat it does
gaincvCV in that modulates Gain (output brightness/RGB multiply); displaces the Gain fader, linear, summed at the param target.
control voltage (CV); modulates gain (additive offset — ±1 CV sweeps the full range, centered on the knob)
asset_pitchpitchPitch (V/oct) in carrying the raw slot-select value; read on each asset_gate rising edge and mapped by pitch class to one of the 7 C-major slots (C..B). No CV scaling — passed through raw.
V/oct pitch CV; modulates asset_pitch (summed directly (the destination DSP scales it))
asset_gategateGate/trigger in: the card edge-detects the RISING edge (level crosses ~0.5) — on each edge it reads asset_pitch, resolves the slot, and switches to it if that slot holds an image. Acts on edges, not the held level.
gate / trigger; modulates asset_gate (summed directly (the destination DSP scales it))

outputs

idcablewhat it does
outimageImage out — the active slot's image as a video-domain image source (RGB multiplied by Gain), at engine resolution; patch into any video module.
RGB still image

params

idlabelrangedefaultcurve
gainGain0..2linear
asset_pitchAsset pitch-10..100linear
asset_gateAsset gate0..10linear

controls

controlwhat it does
Asset gateAsset gate — synthetic, hidden param caching the raw gate level (0..1) from the asset_gate input. Not a card knob; the card edge-detects its rising edge to fire a slot switch.
Asset pitchAsset pitch — synthetic, hidden param caching the raw V/oct from the asset_pitch input. Not a card knob; the card reads it on each gate edge to choose a slot. Range -10..10.
GainGain — output brightness; multiplies the image's RGB. Linear 0..2 (1.0 = unity). Also modulatable via the gain CV input.

source

picturebox.ts on GitHub.

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