Skip to content

fix(osc): accept parameters that appear after startup - #285

Merged
BlueJayLouche merged 1 commit into
mainfrom
fix/osc-runtime-params
Oct 5, 2026
Merged

BlueJayLouche merged 1 commit into
mainfrom
fix/osc-runtime-params

Conversation

@BlueJayLouche

Copy link
Copy Markdown
Owner

Problem

The OSC server's parameter table was filled once, at startup. When an app's parameter list changes at runtime, the renderer refreshes EngineState::param_osc_addresses, so the new parameters are listed as addressable, but nothing registers them with the server. OscState::update_parameter only accepts registered addresses, so every message to such a parameter was dropped without a trace.

In KOVVBOJ this covers every channel and FX parameter, because they are created when the stage loads, after startup. Only parameters that exist at startup (crossfader, master dim, take seconds) responded to OSC.

A port change had the same effect: OscCommand::SetPort rebuilds the server and registers only the built-in parameters.

Fix

OscState::sync_parameters registers any current parameter the server does not know yet, and update_osc calls it each frame before reading values. It is one hash lookup per parameter, the same order of work as the existing per-frame read loop, and it leaves parameters that are already registered untouched.

Parameters that have been removed stay registered. Nothing polls them, so they are inert.

Checked

  • New test osc::tests::parameter_added_after_startup_accepts_messages: a message to a parameter added after startup is dropped before the sync and applied after it, and a second sync does not reset a known parameter.
  • cargo clippy -p rustjay-control -p rustjay-engine --all-targets is clean on macOS.
  • Hands-on: KOVVBOJ built against this branch now receives OSC on ISF channel and FX parameters that were silently ignored before.

KOVVBOJ picks this up when its engine rev is bumped.

🤖 Generated with Claude Code

The OSC server's parameter table was filled once, at startup. An app's
parameters change while it runs (an FX is added, a scene loads), and the
renderer refreshed EngineState's address list for them but nothing told
the server, so such a parameter was listed as addressable while every
message to it was dropped. A port change had the same effect, because it
rebuilt the server with only the built-in parameters.

update_osc now registers any current parameter the server does not know.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@BlueJayLouche
BlueJayLouche merged commit 449e6de into main Oct 5, 2026
2 checks passed
@BlueJayLouche
BlueJayLouche deleted the fix/osc-runtime-params branch October 5, 2026 06:03
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