Make the local device-tree ports configurable at launch#2116
Open
bltzr wants to merge 1 commit into
Open
Conversation
score's LocalTree control device is exposed on hardcoded OSC port 6666 and WebSocket port 9999, so a second score instance cannot expose its tree (the bind throws, is caught and logged) and there is no way to relocate it. Add --local-osc-port / --local-ws-port command-line options (also honoring the SCORE_LOCAL_OSC_PORT / SCORE_LOCAL_WS_PORT environment variables), stored in ApplicationSettings and read by both the per-document local device and the Local protocol factory default. Defaults remain 6666 / 9999, so behaviour is unchanged unless a port is specified. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AvD2PFHZtW6pfsh3gGhayg
Member
|
I think the best way for this would instead to have it be configurable in the Local:: device settings ? |
Member
Author
|
Runtime-verified on macOS (arm64). Launched two instances side by side with distinct ports:
|
jcelerier
reviewed
Jul 14, 2026
| "file", ""); | ||
| parser.addOption(uiOptDebug); | ||
|
|
||
| QCommandLineOption localOscPortOpt( |
Member
There was a problem hiding this comment.
Instead of being added here this should use the infrastructure to add CLI options in the relevant plug-in, c.f. score-plugin-js or score-plugin-jit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
score's LocalTree control device is exposed on hardcoded OSC port 6666 and WebSocket port 9999 (
LocalTreeDocumentPlugin::defaultSettingsandLocalProtocolFactory::static_defaultSettings). A secondscoreinstance therefore can't expose its tree — the bind throws, is caught, and logscould not expose score on port 6666— and there is no way to relocate it.Change
Two load-time options, stored in
ApplicationSettings:--local-osc-port <port>(also$SCORE_LOCAL_OSC_PORT)--local-ws-port <port>(also$SCORE_LOCAL_WS_PORT)Precedence: CLI flag → environment variable → default. Both the per-document local device and the Local protocol factory default read the setting. Defaults stay 6666 / 9999, so behaviour is unchanged unless a port is given.
Usage
Lets multiple instances run side by side (e.g. for testing).
🤖 Generated with Claude Code