diff --git a/session-manager/doc/API.html b/session-manager/doc/API.html index 1ed3a9d..ad87975 100644 --- a/session-manager/doc/API.html +++ b/session-manager/doc/API.html @@ -12,8 +12,8 @@
Jonathan Moore Liles <male@tuxfamily.org>-The following sub-sections describe how these options should behave when the application is part of an NSM session. These rules only apply when session management is active (that is, after the announce handshake described in the section). In order to provide a consistent and predictable user experience, it is critically important for applications to adhere to these guidelines. +The following sub-sections describe how these options should behave when the application is part of an NSM session. These rules only apply when session management is active (that is, after the announce handshake described in the 1.2. NSM OSC Protocol section). In order to provide a consistent and predictable user experience, it is critically important for applications to adhere to these guidelines.
@@ -131,7 +131,7 @@ The application may, however, elect to implement an option called 'Export from S
-This option may behave as normal (even possibly asking the user to confirm exiting). +This option may behave as normal (possibly asking the user to confirm exiting).
@@ -156,10 +156,10 @@ If NSM_URL is undefined, invalid, or unreachable, then the client shoul api_version_major and api_version_minor must be the two parts of the version number of the NSM API as defined by this document.
-Note that if the application intends to register JACK clients, application_name MUST be the same as the name that would normally by passed to jack_client_open. For example, Non-Mixer sends "Non-Mixer" as its application_name. Applications MUST NOT register their JACK clients until receiving an open message; the open message will provide a unique client name prefix suitable for passing to JACK. This is probably the most complex requirement of the NSM API, but it isn't difficult to implement, especially if the application simply wishes to delay its initialization process breifly while awaiting the announce reply and subsequent open message. +Note that if the application intends to register JACK clients, application_name MUST be the same as the name that would normally be passed to jack_client_open. For example, Non-Mixer sends "Non-Mixer" as its application_name. Applications MUST NOT register their JACK clients until receiving an open message; the open message will provide a unique client name prefix suitable for passing to JACK. This is probably the most complex requirement of the NSM API, but it isn't difficult to implement, especially if the application simply wishes to delay its initialization process breifly while awaiting the announce reply and subsequent open message.
-capabilities MUST be a string containing a colon separated list of the special capabilities the client possesses. e.g. ":dirty:switch:progress:" +capabilities MUST be a string containing a colon separated list of the special capabilities the client possesses. e.g. :dirty:switch:progress:
-The client MUST immediately save the current application specific project data to the project path previously established in the 'open' message. UNDER NO CIRCUMSTANCES should a dialog be displayed to the user (giving a choice of where to save, etc.) This message will only be delivered after a previous open message, and may be sent any number of times within the course of a session (including zero, if the user aborts the session). +This message will only be delivered after a previous open message, and may be sent any number of times within the course of a session (including zero, if the user aborts the session).
+
The client MUST respond to the 'save' message with: @@ -427,7 +428,7 @@ If the server publishes the :server_control: capability, then clients c The session manager not only manages clients via OSC, but it is itself controlled via OSC messages. The server responds to the following messages.
-All of the following messages will be responded to back to the sender's address with one of the two following messages: +All of the following messages will be responded to, at the sender's address, with one of the two following messages:
/reply s:path s:message @@ -456,57 +457,59 @@ The possible errors are: |
Adds a client to the current session.
-Saves the current session.
-Saves the current session and loads a new session.
-Saves the current session and creates a new session.
-+Saves and closes the current session, makes a copy, and opens it. +
+Saves and closes the current session.
-Closes the current session WITHOUT SAVING
-Saves and closes the current session and terminates the server.
-
Lists available projects. One /reply message will be sent for each existing project.
-If the server includes :broadcast: in its capability string, then clients may send broadcast messages to each other through the NSM server. Clients may send messages to the server at the path /nsm/server/broadcast.
diff --git a/session-manager/doc/API.mu b/session-manager/doc/API.mu index bff68c7..8b89b15 100644 --- a/session-manager/doc/API.mu +++ b/session-manager/doc/API.mu @@ -2,7 +2,8 @@ ! title Non Session Management API ! author Jonathan Moore Liles #(email,male@tuxfamily.org) ! date August 1, 2010 -! revision Version 0.8 +! revision Version 0.9 +! extra #(image,logo,icon.png) -- Table Of Contents @@ -56,7 +57,7 @@ The following sub-sections describe how these options should behave when the application is part of an NSM session. These rules only apply when session management is active (that is, after the `announce` - handshake described in the #(ref,NSM OSC Protocol) section). + handshake described in the #(ref,Non Session Management API::NSM OSC Protocol) section). In order to provide a consistent and predictable user experience, it is critically important for applications to adhere to these @@ -100,7 +101,7 @@ ::: Quit or Exit - This option may behave as normal (even possibly asking the user to + This option may behave as normal (possibly asking the user to confirm exiting). :: NSM OSC Protocol @@ -135,7 +136,7 @@ Note that if the application intends to register JACK clients, `application\_name` *MUST* be the same as the name that would - normally by passed to `jack\_client\_open`. For example, Non-Mixer + normally be passed to `jack\_client\_open`. For example, Non-Mixer sends "Non-Mixer" as its `application\_name`. Applications *MUST NOT* register their JACK clients until receiving an `open` message; the `open` message will provide a unique client name prefix suitable @@ -147,7 +148,7 @@ `capabilities` *MUST* be a string containing a colon separated list of the special capabilities the client - possesses. e.g. ":dirty:switch:progress:" + possesses. e.g. `:dirty:switch:progress:` // Available Client Capabilities [[ Name, Description @@ -207,7 +208,7 @@ the subsection for each message. If there is an error and the action cannot be completed, then - `error\_code` *MUST* be set to a valid error code (see #(fig,Error Code Definitions)) + `error\_code` *MUST* be set to a valid error code (see #(ref,Non Session Management API::NSM OSC Protocol::Error Code Definitions)) and `message` to a string describing the problem (suitable for display to the user). @@ -318,15 +319,24 @@ > /nsm/client/save - The client *MUST* immediately save the current application specific - project data to the project path previously established in the - 'open' message. *UNDER NO CIRCUMSTANCES* should a dialog be - displayed to the user (giving a choice of where to save, etc.) - This message will only be delivered after a previous `open` message, and may be sent any number of times within the course of a session (including zero, if the user aborts the session). + If able to, the client *MUST* immediately save the current + application specific project data to the project path previously + established in the 'open' message. *UNDER NO CIRCUMSTANCES* should a + dialog be displayed to the user (giving a choice of where to save, + etc.) + + However, if the client is incapable of saving at the specific moment + without disturbing the user (e.g. a JACK client that can't save + while the transport is rolling without causing massive XRUNS), then + the client may respond to "/error" with ERR_NOT_NOW and a string + explaining exactly why the save could not be completed (so that, in + this example, the user knows that they have to stop the transport in + order to save). + ::::: Response The client *MUST* respond to the 'save' message with: @@ -438,8 +448,8 @@ itself controlled via OSC messages. The server responds to the following messages. - All of the following messages will be responded to back to the - sender's address with one of the two following messages: + All of the following messages will be responded to, at the sender's + address, with one of the two following messages: > /reply s:path s:message @@ -461,33 +471,39 @@ [[ ERR_UNSAVED_CHANGES, Unsaved changes would be lost = /nsm/server/add s:path_to_executable + Adds a client to the current session. = /nsm/server/save + Saves the current session. = /nsm/server/load s:project_name + Saves the current session and loads a new session. = /nsm/server/new s:project_name + Saves the current session and creates a new session. += /nsm/server/duplicate s:new_project + + Saves and closes the current session, makes a copy, and opens it. + = /nsm/server/close + Saves and closes the current session. = /nsm/server/abort + Closes the current session *WITHOUT SAVING* = /nsm/server/quit + Saves and closes the current session and terminates the server. -= /nsm/server/duplicate s:new_project - Saves and closes the current session, creates a complete copy of - it as `new_project` and opens it. The existing project should ideally be - a lightweight template, as copying any audio data could be very time - consuming. - = /nsm/server/list + Lists available projects. One `\/reply` message will be sent for each existing project. :::: Client to Client Communication diff --git a/session-manager/doc/MANUAL.html b/session-manager/doc/MANUAL.html index de77e99..a5fe4af 100644 --- a/session-manager/doc/MANUAL.html +++ b/session-manager/doc/MANUAL.html @@ -3,17 +3,17 @@ --The first is to click the Open button and type in the exact name of an existing session. The second is to click on the desired session name in the session list panel in the left hand half of the interface. Either way, opening a session saves the current session and switches to the new one. Clients which are capable of switching projects without restarting are instructed to do so, resulting in very fast session open times when such clients are participating in both sessions. +The first is to click the Open button and type in the exact name of an existing session. The second is to click on the desired session name in the session list panel on the left side of the interface. +
++Either way, opening a session saves the current session and switches to the new one. Clients which are capable of switching projects without restarting are instructed to do so, resulting in very fast session open times when such clients are participating in both sessions.
Clients cannot be added until a session is open, either by Open or New.
-As each client launches, a status bar representing it will be added to the client list in the hand panel of the interface. For clients which are capable of reporting their progress, a progress bar will also become active. +As each client launches, a status bar representing it will be added to the client list on the right half the interface. For clients which are capable of reporting their progress, a progress bar will also become active.
Only clients supporting the NSM protocol can be told what to open and when to save. Clients not supporting NSM may still be added to the session, but their behavior is undefined other than that NSM can invoke and kill them. @@ -128,22 +133,32 @@ Templates are supported in by the Non Session Manager via duplication. Clicking Obviously, this should be avoided for sessions containing audio data, as the copy would be very time consuming.
-To create a template in the first place, simply use New to start a new session (preferably with a name beginning with Template/), add the desired clients to it, and configure them (e.g. add plugins, make JACK connections, etc.) Now, any time you want to start a session from that template, simply switch to the template session and click Duplicate to create a new session based on it. +To create a template in the first place, simply use New to start a new session (preferably with a name beginning with "Templates/"), add the desired clients to it, and configure them (e.g. add plugins, make JACK connections, etc.) Now, any time you want to start a session from that template, simply switch to the template session and click Duplicate to create a new session based on it.
-This option will prompt the user for the executable name of the client to be added to the session. It is not necessary to type the full path (the PATH environment variable will be searched to find the executable). +This option will prompt the user for the executable name of the client to be added to the session. It is not necessary to type the full path (the PATH environment variable will be searched to find the executable). +
++When controlling an NSM session distributed across multiple machines, the user will also be required to choose which server to invoke the client on.
-If a client dies unexpectedly or is closed by the user (e.g. by closing its main window), Non Session Manager will detect this and two buttons will appear on that Client's status bar. One button, the arrow, causes the client to be restarted, and to reopen its project file where it left off. The X button causes the client to be permanently removed from the session. +If a client dies unexpectedly or is closed by the user (e.g. by closing its main window), Non Session Manager will detect this and two buttons will appear on that Client's status bar. One button, the arrow, causes the client to be restarted and to reopen its project file where it left off. The X button causes the client to be permanently removed from the session.
--The NSM Daemon (nsmd) is launched automatically by the Non Session Manager interface whenever one is not found to be already running at the URL specified in the environment +NSM manages clients together in a session. That's it. NSM doesn't know or care what Window Manager or audio subsystem those clients use--nor should it. Specific clients must be written to persist these environmental factors, and added to sessions when required.
-Users who are not attempting setup advanced modes like shared sessions between machines will not normally need to even know that nsmd is running. +For saving and restoring the JACK connection graph, a simple headless client named jackpatch has been developed and included in the NSM distribution. Simply add jackpatch do your basic template session and all the sessions you base on it will have their JACK connection graphs automatically saved and restored. +
++The NSM Daemon (nsmd) is launched automatically by the Non Session Manager interface whenever one is not found to be already running at the URL specified in the environment. +
++Users who are not attempting to setup advanced modes like shared sessions between machines will not normally need to even know that nsmd is running.
But for those advanced users, here are the command-line options for launching nsmd separately from the GUI. @@ -153,13 +168,13 @@ nsmd [--session-root path] [--osc-port port] [--detach]
-The --session-root option allows one to override default Session Root is "$HOME/NSM Sessions" (this option can also be passed to the GUI, which will hand it over to the daemon). +The --session-root option allows one to override where Session Root is, from the default of "$HOME/NSM Sessions" (this option can also be passed to the GUI, which will hand it over to the daemon).
--osc-port instructs the daemon to bind to a specific UDP port number instead of selecting an available port automatically.
---detach instructs the daemon to close its standard input and output and go completely into the background. This is useful for starting the daemon remotely with rsh. +--detach instructs the daemon to close its standard input and output and go into the background. This is useful for starting the daemon remotely with rsh.
When nsmd starts, it will print a string of the following form its standard output. @@ -169,27 +184,27 @@ NSM_URL=osc.udp://foo.bar.net:17551/
-This is the OSC URL for the daemon process. If this URL is included in the environment (by either using a fixed port number or starting nsmd early in the initialization process [like in your .xinitrc] extracting the URL from its output.) then any NSM capable client will join the current session when started, even if started from outside the Non Session Manager interface (e.g. by your desktop environment's program launch menu). +This is the OSC URL for the daemon process. If this URL is included in the environment (by either using a fixed port number or starting nsmd early in the initialization process [like in your .xinitrc] extracting the URL from its output) then any NSM capable client will join the current session when started, even if started from outside the Non Session Manager interface (for example, by your Desktop Environment's program launch menu).
--When dealing with multiple instances of nsmd, whether they be on the same machine or different machines, it is most convenient to use fixed port numbers. +When dealing with multiple instances of nsmd, whether they be on the same host or separate hosts, it is most convenient to use fixed port numbers specified with the --osc-port command-line option.
--In some situations it is necessary to have different audio programs running on different machines connected by S/PDIF/or analog wiring or over TCP/IP as achieved by netjack. Usually the reason for doing this is that neither machine is powerful enough to do all the DSP or synthesis by itself. +In some situations it is necessary to have different audio programs running on different machines, connected by S/PDIF, analog wiring, or over TCP/IP as achieved by netjack. Usually the reason for doing this is that neither machine is powerful enough to do all the DSP or synthesis alone.
-Needless to say, these configurations have historically been extremely difficult to manage--requiring heavy scripting or lots of manual setup. +Needless to say, these configurations have historically been extremely difficult to manage--requiring heavy scripting and/or lots of manual setup.
-NSM is the first and currently only system capable of managing these sessions. +NSM is the first--and currently only--system capable of managing these sessions.
Let us assume the following conditions for our example:
-The first step is to decide what port numbers to use. Let's choose 6661 for Host-A and 6662 for Host-B. @@ -224,12 +239,12 @@ user@host-a:~$ non-session-manager --nsm-url osc.udp://host-a:6661 --nsm-url osc
The Non Session Manager interface will then connect to the daemons on both hosts. Creating a new session will create separate session files on each host. When adding a client, the interface will present the user with a choice of which host to invoke the client on. Aside from that it is just like managing any other session. Sessions can be opened, saved, switched between, etc. and the desired effect will be seen on each host.
--Simply starting two (or more) instances of the Non Session Manager interface on the same machine (when the NSM_URL environment variable is unset) will result in the ability to have two different sessions open at the same time on the same host. The instances are prohibited from opening two instances of the same session. +Simply starting two (or more) instances of the Non Session Manager interface on the same machine (when the NSM_URL environment variable is unset) will result in the ability to have two different sessions open at the same time on the same host. A lock file prevents the two instances from opening the same session.
-Imagining a useful application of this feature is left as an exercise for the user. +Imagining a useful application of this feature is left as an exercise for the reader.
diff --git a/session-manager/doc/MANUAL.mu b/session-manager/doc/MANUAL.mu index 87f74db..6c6a70c 100644 --- a/session-manager/doc/MANUAL.mu +++ b/session-manager/doc/MANUAL.mu @@ -1,7 +1,8 @@ -! title The Non Session Manager User Manual -! author Jonathan Moore Liles #(email,male@tuxfamily.org) -! date February 25, 2012 +! title Non Session Manager User Manual +! author Jonathan Moore Liles #(email,male@tuxfamily.org) +! date February 25, 2012 +! extra #(image,logo,icon.png) -- Table Of Contents @@ -33,11 +34,11 @@ There are two ways to open a session. - The first is to click the Open button and type in the exact name of - an existing session. The second is to click on the desired session - name in the session list panel in the left hand half of the + The first is to click the /Open/ button and type in the exact name + of an existing session. The second is to click on the desired + session name in the session list panel on the left side of the interface. - + Either way, opening a session saves the current session and switches to the new one. Clients which are capable of switching projects without restarting are instructed to do so, resulting in very fast @@ -48,7 +49,7 @@ /New/. As each client launches, a status bar representing it will be added - to the client list in the hand panel of the interface. For clients + to the client list on the right half the interface. For clients which are capable of reporting their progress, a progress bar will also become active. @@ -108,8 +109,8 @@ data, as the copy would be very time consuming. To create a template in the first place, simply use /New/ to start a - new session (preferably with a name beginning with Template\/), add - the desired clients to it, and configure them (e.g. add plugins, + new session (preferably with a name beginning with "Templates\/"), + add the desired clients to it, and configure them (e.g. add plugins, make JACK connections, etc.) Now, any time you want to start a session from that template, simply @@ -121,24 +122,42 @@ This option will prompt the user for the executable name of the client to be added to the session. It is not necessary to type the full path (the PATH environment variable will be searched to find - the executable). + the executable). + + When controlling an NSM session distributed across multiple + machines, the user will also be required to choose which server to + invoke the client on. ::: Removing a Client From a Session If a client dies unexpectedly or is closed by the user (e.g. by closing its main window), Non Session Manager will detect this and two buttons will appear on that Client's status bar. One button, the - arrow, causes the client to be restarted, and to reopen its project + arrow, causes the client to be restarted and to reopen its project file where it left off. The /X/ button causes the client to be permanently removed from the session. + +:: Saving and Restoring Aspects of the Environment + + NSM manages clients together in a session. That's it. NSM doesn't + know or care what Window Manager or audio subsystem those clients + use--nor should it. Specific clients must be written to persist + these environmental factors, and added to sessions when required. + + For saving and restoring the JACK connection graph, a simple + headless client named `jackpatch` has been developed and included in + the NSM distribution. Simply add `jackpatch` do your basic template + session and all the sessions you base on it will have their JACK + connection graphs automatically saved and restored. + :: The NSM Daemon The NSM Daemon (nsmd) is launched automatically by the Non Session Manager interface whenever one is not found to be already running at - the URL specified in the environment + the URL specified in the environment. - Users who are not attempting setup advanced modes like shared + Users who are not attempting to setup advanced modes like shared sessions between machines will not normally need to even know that `nsmd` is running. @@ -147,16 +166,16 @@ > nsmd [--session-root path] [--osc-port port] [--detach] - The `--session-root` option allows one to override default /Session - Root/ is "$HOME\/NSM Sessions" (this option can also be passed to the - GUI, which will hand it over to the daemon). + The `--session-root` option allows one to override where /Session + Root/ is, from the default of "$HOME\/NSM Sessions" (this option can + also be passed to the GUI, which will hand it over to the daemon). `--osc-port` instructs the daemon to bind to a specific UDP port number instead of selecting an available port automatically. `--detach` instructs the daemon to close its standard input and - output and go completely into the background. This is useful for - starting the daemon remotely with `rsh`. + output and go into the background. This is useful for starting the + daemon remotely with `rsh`. When nsmd starts, it will print a string of the following form its standard output. @@ -166,37 +185,36 @@ This is the OSC URL for the daemon process. If this URL is included in the environment (by either using a fixed port number or starting nsmd early in the initialization process [like in your .xinitrc] - extracting the URL from its output.) then any NSM capable client - will join the current session when started, even if started from - outside the Non Session Manager interface (e.g. by your desktop - environment's program launch menu). + extracting the URL from its output) then any NSM capable client will + join the current session when started, even if started from outside + the Non Session Manager interface (for example, by your Desktop + Environment's program launch menu). - -::: Multiple NSMD Instance +::: Multiple NSMD Instances When dealing with multiple instances of nsmd, whether they be on the - same machine or different machines, it is most convenient to use - fixed port numbers. + same host or separate hosts, it is most convenient to use fixed port + numbers specified with the `--osc-port` command-line option. :::: Distributed Session Management In some situations it is necessary to have different audio programs - running on different machines connected by S\/PDIF\/or analog wiring + running on different machines, connected by S\/PDIF, analog wiring, or over TCP\/IP as achieved by `netjack`. Usually the reason for doing this is that neither machine is powerful enough to do all the - DSP or synthesis by itself. + DSP or synthesis alone. Needless to say, these configurations have historically been - extremely difficult to manage--requiring heavy scripting or lots of - manual setup. + extremely difficult to manage--requiring heavy scripting and\/or + lots of manual setup. - NSM is the first and currently only system capable of managing these - sessions. + NSM is the first--and currently only--system capable of managing + these sessions. Let us assume the following conditions for our example: -+ We want to distribute a session across two hosts, Host-A and Host-B, on the local area network -+ Each host has a completely independent file system (i.e. not NFS) ++ We want to distribute a session across two hosts, Host-A and Host-B, on the local area network. ++ Each host has a completely independent file system (i.e. not NFS). + We have appropriate access to both hosts. The first step is to decide what port numbers to use. Let's choose @@ -234,8 +252,9 @@ Simply starting two (or more) instances of the Non Session Manager interface on the same machine (when the NSM\_URL environment variable is unset) will result in the ability to have two different - sessions open at the same time on the same host. The instances are - prohibited from opening two instances of the same session. + sessions open at the same time on the same host. A lock file + prevents the two instances from opening the same session. Imagining a useful application of this feature is left as an - exercise for the user. + exercise for the reader. +