Description
Build the thread-safe ParameterState class that manages parameter values from both encoder input and OSC feedback, with temporal echo suppression to prevent feedback loops.
Tasks
Acceptance Criteria
- Encoder changes propagate immediately to display and OSC
- OSC feedback updates display but doesn't echo back to VDMX within 100ms
- Thread-safe under concurrent encoder + OSC updates
- Tests cover echo suppression timing and concurrent access
Technical Notes
Three-layer feedback suppression:
- Temporal — 100ms window after local change, ignore incoming OSC for that parameter
- Value dead zone — ignore changes < 0.001 (float rounding noise)
- Source tagging (optional) — track last change origin
Description
Build the thread-safe
ParameterStateclass that manages parameter values from both encoder input and OSC feedback, with temporal echo suppression to prevent feedback loops.Tasks
ParameterStatewith thread-safe lockset_from_encoder(name, delta)— apply relative change, mark dirty, set echo windowset_from_osc(name, value)— apply if not within echo suppression windowpop_dirty()— return and clear set of parameters needing redrawsnapshot()— return current parameter values for renderingAcceptance Criteria
Technical Notes
Three-layer feedback suppression: