ScinGroup:
Filter:
Scintillator/Classes (extension) | Quarks > Scintillator > Scinth

ScinGroup
ExtensionExtension

Represents a group of other Scinths or ScinGroups running on the Scintillator server.

Description

A ScinGroup is analogous to the audio synthesis class Group. It is useful for controlling the order of execution of Scinths on the server. Like Node, some of the methods useful for controlling ScinGroups are defined in ScinNode, so it is useful to review that help file as well for methods that apply to ScinGroups and Scinths both.

Class Methods

.new

Creates a new ScinGroup and requests its creation on the Scintillator server.

Arguments:

target

A target for this ScinGroup. The target can be a ScinGroup or a Scinth. If it is a ScinServer, it will be converted to the default group on that server. If it is nil, it will be converted to the default group on the default server.

addAction
\addToHeadadd at the head of the group specified by target, which must be a ScinGroup
\addToTail(the default) add at the tail of the group specified by target, which must be a ScinGroup
\addAfteradd immediately after target in its server's node order
\addBeforeadd immediately before target in its server's node order
\addReplacereplace target and take its place in its server's node order
NOTE: ScinGroup and Scinth both differ from the audio counterparts by providing \addToTail as the default, meaning that new ScinNodes are by default executed last in their group on the server.

Instance Methods

.queryTree

Query the server to understand the structure of this particular ScinGroup. See the /scin_g_queryTree documentation in the Scintillator-Scinth-Server-Command-Reference for details about the returned array.

Arguments:

callback

A function to call with the array returned from the server. The one argument to the function will be OSC response array in its entirety.

includeControls

A boolean, default false. If true the returned call from the server will include the values of all of the parameters in each Scinth contained in the ScinGroup.

.moveNodeToHead

Move the supplied node (either a Scinth or a ScinGroup) to the head of this group, so that it is executed first.

Arguments:

node

The Scinth or ScinGroup to move.

.dumpTree

Request that the server print a log of all descendants of this group. The log is printed at the informational level, so if log levels are higher than informational the printout will not show. Note that the default logging level for the server is warning and above. To change the log level see the ScinServer documentation.

Arguments:

postControls

A boolean, default false. If true the log message will include the names and values of all the controls in each Scinth logged.

.freeAll

Recursively frees all children of this ScinGroup, leaving the ScinGroup itself intact and empty.

.moveNodeToTail

Move the supplied node (either a Scinth or a ScinGroup) to the tail of this group, so that it is executed last.

Arguments:

node

The Scinth or ScinGroup to move.

.deepFree

Recursively frees all Scinths only for this node and any descendent groups. This leaves the group structure intact but removes all Scinths.

Examples

dumpTree output:

NODE TREE ScinGroup 1002
    1049 bar
    1050 bar
    1051 bar
    1052 bar
    1053 bar
    1054 bar
    1055 bar
    1056 bar
    1057 bar
    1058 bar
    1059 bar
    1060 bar
    1061 bar
    1062 bar
    1063 bar

dumpTree output:

NODE TREE ScinGroup 1002
    1064 group
        1049 bar
        1063 bar
    1065 group
        1050 bar
        1062 bar
    1066 group
        1051 bar
        1061 bar
    1067 group
        1052 bar
        1060 bar
    1068 group
        1053 bar
        1059 bar
    1069 group
        1054 bar
        1058 bar
    1070 group
        1055 bar
        1057 bar
    1071 group
        1056 bar