Skip to content

Commit

Permalink
improve documentation of OSC scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
gisogrimm committed May 5, 2024
1 parent c996d37 commit 277256e
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions manual/manual.tex
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ \subsection{Keyboard shortcuts in the main window}

\subsection{Network remote control via OSC}

Most options can be controlled remotely using the Open Sound Control (OSC) protocol. An OSC message consists of one or more numeric values or strings. Each message can be sent to an OSC path on an OSC server. \tascar{} supports UDP and TCP transport layers to receive OSC messages. If more than one transport layer or multiple ports are required, the ``oscserver'' module can be used (see section \ref{sec:oscserver}). A MATLAB/GNU Octave remote control tool is available, see section \ref{sec:sendosc} for more details.
The majority of options in \tascar{} can be controlled remotely via the Open Sound Control (OSC) protocol. An OSC message comprises one or more numeric values or strings. Each message can be transmitted to an OSC path on an OSC server. \tascar{} supports both UDP and TCP transport layers for the receipt of OSC messages. Should the necessity arise for the utilisation of more than one transport layer or multiple ports, the ``oscserver'' module may be employed (for further details, please refer to section \ref{sec:oscserver}). Additionally, a MATLAB/GNU Octave remote control tool is available (for further details, please refer to section \ref{sec:sendosc}).

A list of OSC variables with their type and, in some cases, documentation, typical range and current value can be read using the special variable \verb!/sendvarsto! This OSC variable takes three string parameters: The first is a valid OSC URL, e.g. \verb!osc.udp://localhost:9000/!. The variable list is sent to this address. The second parameter is an OSC path to send the variable list to, e.g. \verb!/getvar!. The third parameter, which is optional, is a prefix. If specified, only variables starting with that prefix will be reported.

Expand Down Expand Up @@ -404,11 +404,9 @@ \subsection{Network remote control via OSC}
%
In this case you should use TCP transport.

OSC variables can also be read from a file. In this case, every non-empty line not starting with \verb!#! or \verb!.! is interpreted as an OSC message. The first element of a space-separated list of words or numbers is the path, all other elements are converted to numeric floats if possible, otherwise they are sent as strings. If a line starts with a comma, the number after the comma is interpreted as the time in seconds to wait before processing the next line. Lines starting with \verb!#! or empty lines are ignored. If a space-separated list of filenames (optionally quoted to include filenames with spaces) is specified instead of a single filename, all specified files are processed in sequence. Starting a script while other scripts are still being processed will abort the execution of other scripts.
It is also possible to read OSC variables from a file. This can be achieved either through the XML variable \attr{initoscscript}, or the OSC variable \attr{/runscript}. In this case, every non-empty line that does not begin with \attr{#}, \attr{@}, \attr{<}, or \attr{,}, is interpreted as an OSC message. The initial element of a space-separated list of words or numbers represents the path. All subsequent elements are converted to numeric floats if feasible, whereas those that are not are transmitted as strings. If a line commences with a comma \attr{,}, the number following the comma is interpreted as the time in seconds to await the next line's processing. Lines that commence with a hashtag \attr{#} and those that are empty are disregarded. Lines that commence with the ``at'' symbol \attr{@} indicate the presence of a ``timed message.'' In this context, the numerical value immediately following the \attr{@} symbol represents the session time at which the subsequent message is dispatched.

If the filename does not start with an absolute path, the session attribute \attr{scriptpath} is used as a prefix. The default file ending for \tascar{} OSC scripts is \verb!.tosc!. With the session attribute \attr{initoscscript}, an OSC script can be specified which will be run after loading a session.

You cannot use \verb!/runscript! to read nested OSC script files. Instead, write a line of \verb!<filename! into the script file at the position where the nested file \verb!filename! is to be read. \attr{scriptpath} and \attr{scriptext} will be prefixed and appended to the filename. Make sure there are no leading or trailing spaces in the line starting with \verb!<!.
In the event that a space-separated list of filenames (optionally quoted to include filenames with spaces) is specified instead of a single filename, all specified files are processed in sequence. It should be noted that if the XML attribute \attr{scriptcancel} is set to ``true'', the execution of other scripts will be aborted if a script is initiated while other scripts are still being processed. Otherwise, the scripts will be appended. Furthermore, if the filename does not commence with an absolute path, the session attribute \attr{scriptpath} will be used as a prefix. The default file extension for \tascar{} is OSC scripts, which are designated by the extension ``.tosc''. With the session attribute \attr{initoscscript}, an OSC script can be specified which will be run after loading a session. It is important to note that the \attr{/runscript} OSC command cannot be used to read nested OSC script files. Instead, a line containing \verb!<filename! should be written into the script file at the position where the nested file \verb!filename! is to be read. The variables \attr{scriptpath} and \attr{scriptext} will be prefixed and appended to the filename. It is required that there are no leading or trailing spaces in the line that begins with \verb!<!.

\subsection{Optimization of the operating system for audio processing}

Expand Down

0 comments on commit 277256e

Please sign in to comment.