r/macosprogramming • u/shubhrasaha • 12h ago
Camera input to MIDI on macOS: separating continuous control from note triggers
Hi, I'm Shubhra, one of the people building Sonari, a macOS instrument that uses the built-in camera to turn hand movement into MIDI for a DAW. I've been working through a boundary in the interaction model: some movements should be continuous values, such as pitch bend, while others should become discrete events, such as a strum or drum hit.
The same tracking noise affects them differently. Smoothing can make a continuous control steadier, but it can delay an event. A trigger threshold that prevents accidental notes can also make a deliberate hit feel unresponsive. I'm considering whether to treat these as separate paths, with continuous smoothing for values and hysteresis or a neutral zone for event detection.
For people building macOS camera or sensor input, how do you usually structure that boundary? Do you keep one shared filter before routing inputs, or tune filtering separately for continuous controls and triggers? I'm interested in the interaction and input architecture side.