Proposal: Client JSON-RPC additions — channel feedback, mute-myself state, connect/disconnect #3993
stefan1000
started this conversation in
Ideas
Replies: 1 comment 2 replies
|
The first thing I want to see is moving the state out of the GUI into the Client / Channel. That should happen before any JSON RPC changes. |
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Follow-up to #2949 (JSON-RPC API methods to control and monitor channel parameters). The core problem identified there — state lives in the GUI and controllers get no feedback — is solved by the first item below. Goal: let external tools (motorized fader controllers, , web pages via a local websocket bridge) follow and drive the Jamulus client through the existing JSON-RPC interfaces.
1. Already implemented on my fork
https://github.com/stefan1000/jamulus/tree/grpc_features
jamulusclient/faderStateReceived(notification): fader state of all visible faders (id,name,level,mute,solo), debounced (50 ms). Emitted on level/mute/solo changes, clients joining/leaving, and disconnect. This provides the missing feedback from JSON-RPC API methods to control and monitor channel parameters #2949: an external controller can now verify that its state matches Jamulus.jamulusclient/muteMyselfReceived(notification):{ "muted": bool }whenever the "Mute Myself" state changes (GUI button, MIDI controller, or RPC).jamulusclient/getClientInfo: extended withresult.mutedso controllers can read the initial "Mute Myself" state.Extending JSON-RPC rather than MIDI feedback avoids a new MIDI-out layer in Jamulus: devices vary in how they map faders (CC vs. pitch bend), and that mapping belongs in the external tool, not the Jamulus core.
Use case: Bi-directional wiring of https://iconproaudio.com/product/platform-x-plus/
2. New: connect / disconnect from outside
Use case: a small, separate websocket bridge tool forwards the JSON-RPC API to a websocket, so a web page (e.g. jamscout.de) can offer a one-click "connect to this server" button — no connection dialog, no manual address entry.
jamulusclient/connect(method):params.address(string,host:port, IPv6 literal allowed), optionalparams.name(string) to set the musician name for this session. Starts connecting, returns"ok"immediately; progress is reported asynchronously (see below). Connecting while already connected first disconnects, then connects.jamulusclient/disconnect(method): no params, disconnects if connected, returns"ok".Lifecycle feedback for status displays:
jamulusclient/connectionStateReceived(notification):{ "state": "idle" | "connecting" | "connected" | "connectingFailed" }, emitted on every connection state change (reuses the existingCClientstate signals).jamulusclient/connected/jamulusclient/disconnectedstay as-is.With connect +
connectionStateReceived+ the existingclientListReceived/faderStateReceived, a web page gets the full loop: click a server → client connects → page shows who is in the room → page mirrors faders.3. Follow-up from #2949 (offered, not yet implemented)
Per-channel setters are still missing upstream:
setChannelPan,setChannelSolo,setChannelMute. MIDI-only control paths already exist (OnControllerInPanValue,OnControllerInFaderIsSolo,OnControllerInFaderIsMute); the JSON-RPC methods would reuse those entry points so MIDI and JSON-RPC share one code path.All reactions