From 6b6900a34b035c7d44e1fd2df240a6057e75ec9d Mon Sep 17 00:00:00 2001 From: Scott Wilson Date: Tue, 12 Jan 2021 12:22:40 +0000 Subject: [PATCH 1/2] Create 0000-Add-n_status-Message.md --- rfcs/0000-Add-n_status-Message.md | 37 +++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 rfcs/0000-Add-n_status-Message.md diff --git a/rfcs/0000-Add-n_status-Message.md b/rfcs/0000-Add-n_status-Message.md new file mode 100644 index 0000000..42c2f31 --- /dev/null +++ b/rfcs/0000-Add-n_status-Message.md @@ -0,0 +1,37 @@ +- Title: Add an /n_status Message and equivalent messages +- Date proposed: 2021-01-12 +- RFC PR: https://github.com/supercollider/rfcs/pull/0000 **update this number after RFC PR has been filed** + +# Summary + +Add an /n_status message to the OSC command interface, to allow you to check on whether a node currently exists and if it is running or paused. + +# Motivation + +Given the complications of asynchronous communication, it can be useful to check whether a node already or still exists. (A recent case arose in the VST interface). Currently there is no straightforward way to do this. One can send an /n_query but if the node does not exist this will cause a FAILURE message to be posted (in this case the node not existing is not a failure, just info that we need). This seems like a basic thing that we should be able to query. It would also be useful in multi-client situations, where another client may have created a node. + +The existing NodeWatcher approach does not suffice here, since there is no way to reliably register a node that may not exists. Enabling this would require such a message. + +As we're doing this we may as well include info on whether the node is running or paused. Anything else? + +# Specification + +/n_status - Check whether a node exists and its run status. + +N * int node ID +The server sends an /n_status.reply message for each node to registered clients. + +/n_status.reply has the following arguments: + +int node ID +int status flag, 1 if running, 0 if paused, -1 if node was not found + +In addition we will add a corresponding message to the Node class, and optionally a checkNodeStatus method to the Server class. (Thoughts on this welcome!) Other places in the class lib? + +# Drawbacks + +Adds another command to the interface. + +# Unresolved Questions + +Whether to add a method to Server. My instinct is no, as it's a bit odd style, and Server is already huge. From 899a6770486e7f4b814a87a039ec4eb41ce885fc Mon Sep 17 00:00:00 2001 From: Scott Wilson Date: Tue, 12 Jan 2021 12:28:09 +0000 Subject: [PATCH 2/2] Update and rename 0000-Add-n_status-Message.md to 0013-Add-n_status-Message.md --- ...000-Add-n_status-Message.md => 0013-Add-n_status-Message.md} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename rfcs/{0000-Add-n_status-Message.md => 0013-Add-n_status-Message.md} (94%) diff --git a/rfcs/0000-Add-n_status-Message.md b/rfcs/0013-Add-n_status-Message.md similarity index 94% rename from rfcs/0000-Add-n_status-Message.md rename to rfcs/0013-Add-n_status-Message.md index 42c2f31..02e33b6 100644 --- a/rfcs/0000-Add-n_status-Message.md +++ b/rfcs/0013-Add-n_status-Message.md @@ -1,6 +1,6 @@ - Title: Add an /n_status Message and equivalent messages - Date proposed: 2021-01-12 -- RFC PR: https://github.com/supercollider/rfcs/pull/0000 **update this number after RFC PR has been filed** +- RFC PR: https://github.com/supercollider/rfcs/pull/0013 # Summary