ptz cam
ptzcam · outputCV control of a physical PTZ camera (NexiGo P610, Logitech PTZ Pro 2) — pan/tilt/zoom knobs plus matching CV inputs, sent as MIDI sysex to the native PT-PTZ helper (tools/pt-ptz), which drives the cameras over USB (one MIDI pair and one module per camera). Each axis follows the mode the camera reports in the bind handshake: absolute axes take normalized positions, velocity axes take signed rates with a watchdog-guarded stop; sends are coalesced to ~10 Hz. Carries no audio or video — the camera picture arrives through a normal camera input.
the faceplate
3 inputs · 0 outputs · 4 params
inputs
| id | cable | what it does |
|---|---|---|
pan_cv | cv | Pan CV, ±1, added to the PAN knob. On an absolute-axis camera the sum is the pan position; on a velocity-axis camera it is the pan rate (sign = direction, near-zero = stop). control voltage (CV) |
tilt_cv | cv | Tilt CV, ±1, added to the TILT knob. Position on an absolute axis, rate on a velocity axis. control voltage (CV) |
zoom_cv | cv | Zoom CV, added to the ZOOM knob; the summed 0..1 spans wide to full telephoto. control voltage (CV) |
params
| id | label | range | default | curve |
|---|---|---|---|---|
pan | pan | -1..1 | 0 | linear |
tilt | tilt | -1..1 | 0 | linear |
zoom | zoom | 0..1 | 0 | linear |
slew | slew | 0..1 | 0.3 | linear |
controls
| control | what it does |
|---|---|
| pan | Base pan, ±1. Position on an absolute-axis camera, rate on a velocity-axis one. CV on pan_cv adds to it. |
| Ptzcam connect {n} | The gesture that makes the module do anything at all, and it is two grants in one. Web MIDI shows no port until the browser consents — one prompt, once per origin — and the PT-PTZ helper (tools/pt-ptz, started with start_ptz.sh) is what publishes the virtual PT-PTZ-… pair a camera lives behind, so before this press there is no port to bind, no camera to ask about, and PAN, TILT, ZOOM and SLEW all send nothing. Pressing it grants access, resolves the pair this module is pointed at (the first PT-PTZ-… pair unless a camera is picked in the device body), and requests the caps handshake that tells the module which axes are absolute and which are velocity. It is safe to press again: on an already-granted origin it simply re-resolves, which is what re-binds a helper that was restarted or a camera that was replugged. The outcome is always nameable — bound, no helper port, no caps reply, camera absent, or one of the browser's own refusals — and it is the device body's lamps and error line that name it. |
| slew | Rate limit on absolute-axis motion, fractions of full range per second on a square curve; 1 is instant. Velocity axes ignore it. |
| tilt | Base tilt, ±1. Position on an absolute axis, rate on a velocity axis. CV on tilt_cv adds to it. |
| zoom | Base zoom, 0 wide to 1 full telephoto. CV on zoom_cv adds to it. |
source
ptzcam.ts on GitHub.