picturebox
picturebox · sources · schema v3Image-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.
the faceplate
inputs
| id | cable | what it does |
|---|---|---|
gain | cv | CV 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_pitch | pitch | Pitch (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_gate | gate | Gate/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
| id | cable | what it does |
|---|---|---|
out | image | Image 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
| id | label | range | default | curve |
|---|---|---|---|---|
gain | Gain | 0..2 | — | linear |
asset_pitch | Asset pitch | -10..10 | 0 | linear |
asset_gate | Asset gate | 0..1 | 0 | linear |
controls
| control | what it does |
|---|---|
| Asset gate | Asset 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 pitch | Asset 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. |
| Gain | Gain — 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.