rasterize
rasterize · utilities · schema v1Audio -> video raster mapper. Each video frame paints a fixed run of audio samples (samples/frame, ~800 at 48k/60fps) as voltage-per-pixel into the 640x480 frame in raster order; a scan cursor drifts + wraps through the frame. Faithful raster mapping (NOT an oscilloscope trace) - a steady tone paints drifting horizontal bands whose spacing tracks the audio frequency vs the line/frame rate. Fully untamed: no limiter, no anti-alias.
the faceplate
5 inputs · 2 outputs · 4 params
inputs
| id | cable | what it does |
|---|---|---|
in | audio | The audio signal to rasterize — its samples are painted as pixel brightness into the video frame. audio signal |
cursor | cv | CV that displaces the SCAN cursor (the pixel offset where painting starts each frame), so you can scrub the running scan position with an envelope or LFO. control voltage (CV); modulates cursor (summed directly (the destination DSP scales it)) |
samplesPerFrame | cv | CV that displaces the SAMP/F control (how many samples are painted per frame), modulating how fast the scan sweeps the frame. control voltage (CV); modulates samplesPerFrame (summed directly (the destination DSP scales it)) |
gain | cv | CV that displaces the GAIN applied to each sample before the brightness map, so a modulator can swing the image from dim to blown-out. control voltage (CV); modulates gain (summed directly (the destination DSP scales it)) |
wrap | cv | CV that toggles the WRAP mode (accumulate-and-wrap vs. clear-on-wrap) under gate control. control voltage (CV); modulates wrap (summed directly (the destination DSP scales it)) |
outputs
| id | cable | what it does |
|---|---|---|
thru | audio | Clean audio passthrough — the input signal unchanged (the raster path is non-destructive), so RASTERIZE can sit inline in an audio chain. audio signal |
out | mono-video | The painted raster frame as a mono video texture for downstream video modules. mono video stream |
params
| id | label | range | default | curve |
|---|---|---|---|---|
cursor | Scan | 0..?px | 0 | linear |
samplesPerFrame | Samp/F | 16..8000 | 800 | log |
gain | Gain | 0..8 | 1 | log |
wrap | Wrap | 0..1 | 0 | discrete |
controls
| control | what it does |
|---|---|
| Scan | SCAN — the starting pixel offset of the scan cursor into the 640×480 frame; move it to scrub where painting begins, or leave it and let the cursor drift on its own. |
| Gain | GAIN — a linear gain applied to each sample before it's mapped to pixel brightness; raise it to brighten/clip the image, lower it to darken (0–8). |
| Samp/F | SAMP/F — how many audio samples are painted per video frame (16–8000, default ~800 ≈ one-and-a-quarter scanlines at 48k/60fps); higher values sweep the frame faster and pack more signal per frame. |
| Wrap | WRAP — what happens when the scan cursor reaches the end of the frame: 0 wraps around and keeps accumulating (toroidal drift), 1 clears on wrap for a clean top-to-bottom repaint sweep. |
source
rasterize.ts on GitHub.