luma
luma · effects · schema v2luma is a luminance-domain color processor for a single video stream. It reads the Rec. 601 brightness (0.299/0.587/0.114) of every pixel, runs that luma through a chain of gamma, contrast (scaled around the 0.5 midpoint), posterize (quantize to N steps), then an additive bias, and finally re-applies the new-luma/old-luma ratio to all three RGB channels so chroma (hue and saturation) is preserved while only tonality changes. Patch a video source into in and use it to crush blacks, lift gamma, flatten the image into hard tonal bands, or shift overall brightness; with the defaults (gamma 1, cntr 1, post 16, bias 0) the picture passes through essentially untouched. Note this is NOT a keyer — for foreground/background luma compositing use lumakey instead.
the faceplate
inputs
| id | cable | what it does |
|---|---|---|
in | video | The video frame to process. With nothing patched here the output is solid black; otherwise the luma chain runs on this RGB image. RGB video stream |
gamma | cv | CV input that modulates Gamma; a linear-scaled control voltage drives the gamma-correction exponent applied to the luma. control voltage (CV); modulates gamma (additive offset — ±1 CV sweeps the full range, centered on the knob) |
contrast | cv | CV input that modulates Cntr; linear-scaled voltage sets how hard the luma is scaled around the 0.5 midpoint. control voltage (CV); modulates contrast (additive offset — ±1 CV sweeps the full range, centered on the knob) |
posterizeLevels | cv | CV input that modulates Post; discrete-scaled voltage chooses the number of luma quantization steps (banding amount). control voltage (CV); modulates posterizeLevels (integer buckets — CV selects a discrete step) |
bias | cv | CV input that modulates Bias; linear-scaled voltage adds a final brightness offset to the processed luma. control voltage (CV); modulates bias (additive offset — ±1 CV sweeps the full range, centered on the knob) |
outputs
| id | cable | what it does |
|---|---|---|
out | video | The luma-processed video frame: the same RGB image with gamma, contrast, posterize and bias applied to its brightness while chroma (hue and saturation) is preserved (opaque alpha). RGB video stream |
params
| id | label | range | default | curve |
|---|---|---|---|---|
gamma | Gamma | 0.1..3 | — | linear |
contrast | Cntr | 0..2 | — | linear |
posterizeLevels | Post | 2..16 | — | discrete |
bias | Bias | -0.5..0.5 | — | linear |
controls
| control | what it does |
|---|---|
| Bias | Bias fader — a final additive luma offset, range -0.5 to 0.5; negative depresses overall brightness, positive lifts it, 0 leaves it unchanged. |
| Cntr | Cntr fader — contrast scaling of the luma around 0.5, range 0 to 2; 1.0 is pristine, 0 flattens everything to mid-grey, values above 1 push tones apart for harder contrast. |
| Gamma | Gamma fader — gamma correction of the luma via pow(luma, 1/gamma), range 0.1 to 3.0; 1.0 is linear/untouched, below 1 darkens midtones, above 1 brightens them. |
| Post | Post fader — number of luma quantization steps, range 2 to 16; 16 is effectively off (no visible banding) and 2 crushes the image to two hard tonal bands. |
source
luma.ts on GitHub.