Skip to content

Suppress duplicate outgoing OSC messages per route#54

Open
paul-toben wants to merge 2 commits into
ETCLabs:masterfrom
paul-toben:send-on-change
Open

Suppress duplicate outgoing OSC messages per route#54
paul-toben wants to merge 2 commits into
ETCLabs:masterfrom
paul-toben:send-on-change

Conversation

@paul-toben
Copy link
Copy Markdown

@paul-toben paul-toben commented May 8, 2026

Adds a per-destination "Only Changes" checkbox to each route. When enabled, outgoing OSC messages whose bytes are byte-identical to the previous send to that destination are suppressed.

Behavior

  • Only implemented for OSC outputs.
  • Comparison is byte-for-byte on the built OSC packet (path + args + their types).
  • When combined with the rate limit, the rate-limit timer only advances on a real send. So if Only Changes suppresses a packet, the next genuinely-changed value emits immediately rather than waiting another full period.

Stacks on #53

This PR depends on the refactor and the DispatchBuiltPacket helper from the rate-limit PR. The diff shown here is cumulative until #53 lands; after that, this PR will rebase and show only its own changes.

Implementation

  • The gate sits at the top of DispatchBuiltPacket. On a successful send, the built packet is stashed in lastSentPacket for the next compare.
  • Config: one new optional trailing column in .osc.txt (onlyChanges). Old configs load unchanged; new configs round-trip.
  • UI: one new "Only Changes" checkbox column in the route table editor.

paul-toben added 2 commits May 7, 2026 21:10
Adds a per-destination "Max Rate (Hz)" field that caps how often a route
emits OSC messages. Coalesce semantics: when input arrives faster than
the configured rate, only the most recent message survives the period
and is emitted at the next interval boundary; nothing is sent during
silence.

Useful for streaming sources (PSN, ArtNet/sACN-driven OSC bridges) where
the input rate can saturate downstream consoles.

Scope: OSC outputs only. sACN, ArtNet, MIDI, OTP, and PSN destinations
are unaffected. Default 0 = unlimited; existing configs are unchanged.

Refactor: per-destination dispatch in ProcessRecvPacket extracted into
DispatchBuiltPacket, which returns whether a real send happened so the
rate-limit timer only advances on actual sends. The flush pass runs
once per main loop iteration after the TCP-clients section.
Adds a per-destination "Only Changes" checkbox that drops outgoing OSC
messages whose bytes exactly match the previous send to that
destination. Useful for streaming sources where the talent is often
stationary and there's no point repeating the same value.

When combined with the rate limit, the rate-limit timer only advances
on a real send, so a stationary period followed by a sudden change
emits immediately rather than waiting another full period.

Comparison is byte-for-byte on the built OSC packet. Scope: OSC outputs
only.
@paul-toben paul-toben marked this pull request as ready for review May 8, 2026 01:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant