Create histogram scope
create_histogram_scopeBuild a luminance or RGB histogram video scope for any TOP. Computes histograms on the GPU and outputs a Null TOP ready for previews.
Instructions
Build a luminance (and optional per-channel RGB) histogram video scope for any TOP. Computes the histogram on the GPU using a GLSL TOP (bins×1 output), samples into a CHOP, normalises, and renders through choptoSOP → renderTOP. Output is a single Null TOP ready for previews or bind_to_channel. Implements the roadmap Milestone 2 histogram scope panel as a standalone focused tool.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| source | No | Video source. 'test_pattern' = synthetic Banana.tif (no permission needed). 'existing_top' = reuse a TOP you already have (provide existing_top_path). 'file' = a video/image file. 'device' = live camera — may hang TD on a macOS permission modal. | test_pattern |
| existing_top_path | No | Path of an existing TOP to scope (source='existing_top'). | |
| video_file_path | No | Video/image file path (source='file'). | |
| mode | No | Histogram mode. 'luma' = single luminance trace. 'rgb' = three overlaid per-channel traces. Note: rgb mode is informational only in v1 — ships as luma with rgb flag in extra. | luma |
| bins | No | Number of histogram bins (16..512). Drives the GLSL TOP output width. Changing after build requires a rebuild. | |
| gain | No | Pre-scope brightness (Level TOP brightness1 parameter). | |
| log_scale | No | Compress tall peaks with log(1+x) in the normalisation Math CHOP. Changing after build requires a rebuild. | |
| trace_color | No | Phosphor tint colour for luma mode as a hex string. Ignored when mode='rgb'. | #00ff88 |
| bar_style | No | Reserved — informational only in v1. Both values currently emit the same `choptoSOP`-fed render (a thin vertical strip per bin); a true polyline 'line' mode is planned. Setting this changes the value recorded in `extra` but does not yet change the SOP topology. | bars |
| resolution | No | Output Null TOP size [width, height]. | |
| expose_controls | No | Bind live controls: Gain, TraceColor (luma mode), LogScale (informational). | |
| parent_path | No | Parent COMP path; the histogram scope container is created as 'histogram_scope' inside it. | /project1 |