de.sciss.jcollider
Class Node

java.lang.Object
  extended by de.sciss.jcollider.Node
All Implemented Interfaces:
Constants, javax.swing.tree.TreeNode
Direct Known Subclasses:
Group, Synth

public abstract class Node
extends java.lang.Object
implements Constants, javax.swing.tree.TreeNode

This is a client side representation of a node in the synthesis graph. It is the superclass of Synth and Group and as such abstract. The javax.swing.tree.TreeNode interface is implemented since it's a natural match and it allows classes such as NodeTreeManager to wrap scsynth's node graph on the client side into a usefull GUI representation.

Unlike SCLang, the status fields are not updated by the methods in this class. SCLang does this partly: It will update the node's parent group, while changing the running flag only when the node is freed. We decided to not copy this heterogenous behaviour. Parent group, running and playing flags as well as the newly introduced predecessor and successor fields must be updated by monitoring classes, typically a NodeWatcher.

Version:
0.36, 11-Oct-09
Author:
Hanns Holger Rutz
See Also:
NodeTreeManager, NodeWatcher
Warning:
not all methods are thorougly tested. before all methods have been thoroughly verified, excepted some of them to be wrong or behave different than expected. what certainly works is run-, set-, trace- and free-messages

Field Summary
 
Fields inherited from interface de.sciss.jcollider.Constants
kAddAfter, kAddBefore, kAddReplace, kAddToHead, kAddToTail, kAudioRate, kControlRate, kDemandRate, kDoneFree, kDoneFreeAll, kDoneFreeAllPred, kDoneFreeAllSucc, kDoneFreeGroup, kDoneFreePausePred, kDoneFreePauseSucc, kDoneFreePred, kDoneFreePredGroup, kDoneFreePredGroupDeep, kDoneFreeSucc, kDoneFreeSuccGroup, kDoneFreeSuccGroupDeep, kDoneNothing, kDonePause, kDumpBoth, kDumpHex, kDumpOff, kDumpText, kHeaderAIFF, kHeaderIRCAM, kHeaderNeXT, kHeaderRaw, kHeaderWAVE, kSampleALaw, kSampleDouble, kSampleFloat, kSampleInt16, kSampleInt24, kSampleInt32, kSampleInt8, kSampleMuLaw, kScalarRate
 
Constructor Summary
protected Node(Server server)
          Creates a Node representation.
protected Node(Server server, int nodeID)
          Creates a Node representation for a given node ID.
 
Method Summary
 boolean equals(java.lang.Object o)
          Two nodes are equal if they reside on the same server and have the same node ID.
 void fill(int[] ctrlIndices, int[] numControls, float[] values)
          Sets ranges of the node's control parameters to new values.
 void fill(java.lang.String[] ctrlNames, int[] numControls, float[] values)
          Sets ranges of the node's control parameters to new values.
 de.sciss.net.OSCMessage fillMsg(int[] ctrlIndices, int[] numControls, float[] values)
          Creates an OSC /n_fill message to adjust ranges of the node's control parameters to new values.
 de.sciss.net.OSCMessage fillMsg(java.lang.String[] ctrlNames, int[] numControls, float[] values)
          Creates an OSC /n_fill message to adjust ranges of the node's control parameters to new values.
 void free()
          Frees the node on the server.
 de.sciss.net.OSCMessage freeMsg()
          Creates an OSC /n_free message for the node.
 Group getGroup()
          Queries the group in which the node resides.
 java.lang.String getName()
          Queries the custom name of the node.
 int getNodeID()
          Queries the node's identifier.
 javax.swing.tree.TreeNode getParent()
           
 Node getPredNode()
          Queries the node's predecessor in the graph tree.
 Server getServer()
          Queries the server at which the node resides
 Node getSuccNode()
          Queries the node's successor in the graph tree.
 int hashCode()
           
 boolean isPlaying()
          Queries whether the node exists on the server and is playing (not paused).
 boolean isRunning()
          Queries whether the node exists on the server.
 void map(int[] ctrlIndices, Bus[] busses)
          Maps a list of the node's control parameters to be automatically read from global control busses.
 void map(int[] ctrlIndices, int[] busIndices)
          Maps a list of the node's control parameters to be automatically read from global control busses.
 void map(java.lang.String[] ctrlNames, Bus[] busses)
          Maps a list of the node's control parameters to be automatically read from global control busses.
 void map(java.lang.String[] ctrlNames, int[] busIndices)
          Maps a list of the node's control parameters to be automatically read from global control busses.
 void map(java.lang.String ctrlName, Bus bus)
          Convenience method for a single mapping.
 de.sciss.net.OSCMessage mapMsg(int[] ctrlIndices, Bus[] busses)
          Creates an OSC /n_map message to map a list of the node's control parameters to be automatically read from global control busses.
 de.sciss.net.OSCMessage mapMsg(int[] ctrlIndices, int[] busIndices)
          Creates an OSC /n_map message to map a list of the node's control parameters to be automatically read from global control busses.
 de.sciss.net.OSCMessage mapMsg(java.lang.String[] ctrlNames, Bus[] busses)
          Creates an OSC /n_map message to map a list of the node's control parameters to be automatically read from global control busses.
 de.sciss.net.OSCMessage mapMsg(java.lang.String[] ctrlNames, int[] busIndices)
          Creates an OSC /n_map message to map a list of the node's control parameters to be automatically read from global control busses.
 de.sciss.net.OSCMessage mapMsg(java.lang.String ctrlName, Bus bus)
          Convenience method for a single mapping.
 void mapn(int[] ctrlIndices, Bus[] busses)
          Maps a list of the node's control parameters to be automatically read from global control busses.
 void mapn(int[] ctrlIndices, int[] busIndices, int[] numControls)
          Maps a list of the node's control parameters to be automatically read from global control busses.
 void mapn(java.lang.String[] ctrlNames, Bus[] busses)
          Maps a list of the node's control parameters to be automatically read from global control busses.
 void mapn(java.lang.String[] ctrlNames, int[] busIndices, int[] numControls)
          Maps a list of the node's control parameters to be automatically read from global control busses.
 de.sciss.net.OSCMessage mapnMsg(int[] ctrlIndices, Bus[] busses)
          Creates an OSC /n_mapn message to map a list of the node's control parameters to be automatically read from global control busses.
 de.sciss.net.OSCMessage mapnMsg(int[] ctrlIndices, int[] busIndices, int[] numControls)
          Creates an OSC /n_map message to map a list of the node's control parameters to be automatically read from global control busses.
 de.sciss.net.OSCMessage mapnMsg(java.lang.String[] ctrlNames, Bus[] busses)
          Creates an OSC /n_mapn message to map a list of the node's control parameters to be automatically read from global control busses.
 de.sciss.net.OSCMessage mapnMsg(java.lang.String[] ctrlNames, int[] busIndices, int[] numControls)
          Creates an OSC /n_mapn message to map a list of the node's control parameters to be automatically read from global control busses.
 void moveAfter(Node aNode)
          Moves the node after another node in the server graph.
 de.sciss.net.OSCMessage moveAfterMsg(Node aNode)
          Creates an OSC /n_after message.
 void moveBefore(Node aNode)
          Moves the node before another node in the server graph.
 de.sciss.net.OSCMessage moveBeforeMsg(Node aNode)
          Creates an OSC /n_before message.
 void moveToHead(Group aGroup)
          Moves the node to the head of a group in the server graph.
 de.sciss.net.OSCMessage moveToHeadMsg(Group aGroup)
          Creates an OSC /g_head message.
 void moveToTail(Group aGroup)
          Moves the node to the tail of a group in the server graph.
 de.sciss.net.OSCMessage moveToTailMsg(Group aGroup)
          Creates an OSC /g_tail message.
 void printOn(java.io.PrintStream stream)
           
 void query()
          A debugging method that prints the results of an OSC /n_query message into the server's default print stream.
 void query(java.io.PrintStream out)
          A debugging method that prints the results of an OSC /n_query message into a given print stream.
 de.sciss.net.OSCMessage queryMsg()
           
 void register()
           
 void register(boolean assumePlaying)
           
 void release()
          Releases a node with default release time.
 void release(float releaseTime)
          Releases a node.
 de.sciss.net.OSCMessage releaseMsg()
          Creates an OSC /n_set message to release a node with default release time.
 de.sciss.net.OSCMessage releaseMsg(float releaseTime)
          Creates an OSC /n_set message to release a node.
 void run()
          Resumes the node if it was paused.
 void run(boolean flag)
          Pauses or resumes the node.
 de.sciss.net.OSCMessage runMsg()
          Creates an OSC [ /n_run, <nodeID>, 1 ] message for the node.
 de.sciss.net.OSCMessage runMsg(boolean flag)
          Creates an OSC /n_run message for the node.
 void set(int[] ctrlIndices, float[] values)
          Sets a list of the node's control parameters to new values.
 void set(int ctrlIdx, float value)
          Sets a node's control parameter to a new value.
 void set(java.lang.String[] ctrlNames, float[] values)
          Sets a list of the node's control parameters to new values.
 void set(java.lang.String ctrlName, float value)
          Sets a node's control parameter to a new value.
protected  void setGroup(Group group)
          Sets the node's group.
 de.sciss.net.OSCMessage setMsg(int[] ctrlIndices, float[] values)
          Creates an OSC /n_set message to adjust a list of the node's control parameters to new values.
 de.sciss.net.OSCMessage setMsg(int ctrlIdx, float value)
          Creates an OSC /n_set message to change a node's control parameter to a new value.
 de.sciss.net.OSCMessage setMsg(java.lang.String[] ctrlNames, float[] values)
          Creates an OSC /n_set message to adjust a list of the node's control parameters to new values.
 de.sciss.net.OSCMessage setMsg(java.lang.String ctrlName, float value)
          Creates an OSC /n_set message to change a node's control parameter to a new value.
 void setn(int[] ctrlIndices, float[][] values)
          Sets ranges of the node's control parameters to new values.
 void setn(java.lang.String[] ctrlNames, float[][] values)
          Sets ranges of the node's control parameters to new values.
 void setName(java.lang.String name)
          Set a custom name for the node.
 de.sciss.net.OSCMessage setnMsg(int[] ctrlIndices, float[][] values)
          Creates an OSC /n_setn message to adjust ranges of the node's control parameters to new values.
 de.sciss.net.OSCMessage setnMsg(java.lang.String[] ctrlNames, float[][] values)
          Creates an OSC /n_setn message to adjust ranges of the node's control parameters to new values.
protected  void setPlaying(boolean isPlaying)
          Specifies whether the node is playing (not paused).
protected  void setPredNode(Node predNode)
          Sets the node's predecessor node.
protected  void setRunning(boolean isRunning)
          Specifies whether the node exists on the server.
protected  void setSuccNode(Node succNode)
          Sets the node's successor node.
 void trace()
          Sends an OSC /n_trace message to the server.
 de.sciss.net.OSCMessage traceMsg()
          Creates an OSC /n_trace message for the node.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.swing.tree.TreeNode
children, getAllowsChildren, getChildAt, getChildCount, getIndex, isLeaf
 

Constructor Detail

Node

protected Node(Server server,
               int nodeID)
Creates a Node representation for a given node ID. This method does not send any messages to the server.

Parameters:
server - the Server at which the Node resides
nodeID - the identifier of the Node

Node

protected Node(Server server)
Creates a Node representation. This method does not send any messages to the server. The node ID is automatically assigned from the server's allocator.

Parameters:
server - the Server at which the Node resides
Method Detail

setName

public void setName(java.lang.String name)
Set a custom name for the node. This name is used in print out or GUI representation

Parameters:
name - a name for the node, or null

getName

public java.lang.String getName()
Queries the custom name of the node. By default, a node has not an assigned name.

Returns:
the node's name or null if no name has been given

getGroup

public Group getGroup()
Queries the group in which the node resides.

Returns:
the parent Group of the Node or null if no group has been assigned.

getPredNode

public Node getPredNode()
Queries the node's predecessor in the graph tree. This will only return a valid node, if the node was created on the server and is monitored by a node watcher. If the node is the head node of a group, this will return null.

Returns:
the node's predecessor or null

getSuccNode

public Node getSuccNode()
Queries the node's successor in the graph tree. This will only return a valid node, if the node was created on the server and is monitored by a node watcher. If the node is the tail node of a group, this will return null.

Returns:
the node's successor or null

getServer

public Server getServer()
Queries the server at which the node resides

Returns:
the node's Server

setGroup

protected void setGroup(Group group)
Sets the node's group. This method does not send any messages to the server. It merely stores the group object. This method may be called by a NodeWatcher for example when it receives a /n_info message.

Parameters:
group - the node's new Group or null (if the node is invalidated)

setPredNode

protected void setPredNode(Node predNode)
Sets the node's predecessor node. This method does not send any messages to the server. It merely stores the passed in object. This method may be called by a NodeWatcher for example when it receives a /n_info message.

Parameters:
predNode - the node's new predecessor Node or null

setSuccNode

protected void setSuccNode(Node succNode)
Sets the node's successor node. This method does not send any messages to the server. It merely stores the passed in object. This method may be called by a NodeWatcher for example when it receives a /n_info message.

Parameters:
succNode - the node's new successor Node or null

getNodeID

public int getNodeID()
Queries the node's identifier.

Returns:
the identifier by which the node is known on the server side

isPlaying

public boolean isPlaying()
Queries whether the node exists on the server and is playing (not paused). This information is only valid when the node was tracked by a NodeWatcher.

Returns:
true if the node exists on the server and is playing (not paused), false otherwise

setPlaying

protected void setPlaying(boolean isPlaying)
Specifies whether the node is playing (not paused). This method is supposed to be called by a NodeWatcher. Do not call it yourself.

Parameters:
isPlaying - true if the node is playing false if the node is paused

isRunning

public boolean isRunning()
Queries whether the node exists on the server. This information is only valid when the node was tracked by a NodeWatcher.

Returns:
true if the node exists on the server, false otherwise

setRunning

protected void setRunning(boolean isRunning)
Specifies whether the node exists on the server. This method is supposed to be called by a NodeWatcher. Do not call it yourself.

Parameters:
isRunning - true if the node exists on the server, false otherwise

equals

public boolean equals(java.lang.Object o)
Two nodes are equal if they reside on the same server and have the same node ID. Note that in this implementation, object reference identity for the servers is assumed. You should not create several instances for the same server.

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object
See Also:
equals( Object )

free

public void free()
          throws java.io.IOException
Frees the node on the server. This sends a /n_free message to the server.

Throws:
java.io.IOException - if an error occurs while sending the OSC message
See Also:
freeMsg()

freeMsg

public de.sciss.net.OSCMessage freeMsg()
Creates an OSC /n_free message for the node.

Returns:
an OSCMessage which can be sent to the server
See Also:
free()

run

public void run()
         throws java.io.IOException
Resumes the node if it was paused. This sends a [ /n_run, <nodeID>, 1 ] message to the server.

Throws:
java.io.IOException - if an error occurs while sending the OSC message
See Also:
runMsg()

run

public void run(boolean flag)
         throws java.io.IOException
Pauses or resumes the node. This sends a /n_run message to the server.

Parameters:
flag - false to pause the node, true to resume the node.
Throws:
java.io.IOException - if an error occurs while sending the OSC message
See Also:
runMsg( boolean )

runMsg

public de.sciss.net.OSCMessage runMsg()
Creates an OSC [ /n_run, <nodeID>, 1 ] message for the node.

Returns:
an OSCMessage which can be sent to the server
See Also:
run()

runMsg

public de.sciss.net.OSCMessage runMsg(boolean flag)
Creates an OSC /n_run message for the node.

Parameters:
flag - false to pause the node, true to resume the node.
Returns:
an OSCMessage which can be sent to the server
See Also:
run( boolean )

set

public void set(java.lang.String ctrlName,
                float value)
         throws java.io.IOException
Sets a node's control parameter to a new value. This sends a /n_set message to the server. If the node is a Synth, it adjusts the synth's control value. If the node is a Group, it adjusts the control values of all synths in this group and subgroups of this group.

Parameters:
ctrlName - the name of the control (SynthDef argument)
value - the new value of the control
Throws:
java.io.IOException - if an error occurs while sending the OSC message
See Also:
setMsg( String, float )

setMsg

public de.sciss.net.OSCMessage setMsg(java.lang.String ctrlName,
                                      float value)
Creates an OSC /n_set message to change a node's control parameter to a new value. Sending this message to a Synth adjusts the synth's control value. Sending this message to a Group adjusts the control values of all synths in this group and subgroups of this group.

Parameters:
ctrlName - the name of the control (SynthDef argument)
value - the new value of the control
See Also:
set( String, float )

set

public void set(int ctrlIdx,
                float value)
         throws java.io.IOException
Sets a node's control parameter to a new value. This sends a /n_set message to the server. If the node is a Synth, it adjusts the synth's control value. If the node is a Group, it adjusts the control values of all synths in this group and subgroups of this group.

Parameters:
ctrlIdx - the index of the control (SynthDef argument)
value - the new value of the control
Throws:
java.io.IOException - if an error occurs while sending the OSC message
See Also:
setMsg( int, float )

setMsg

public de.sciss.net.OSCMessage setMsg(int ctrlIdx,
                                      float value)
Creates an OSC /n_set message to change a node's control parameter to a new value. Sending this message to a Synth adjusts the synth's control value. Sending this message to a Group adjusts the control values of all synths in this group and subgroups of this group.

Parameters:
ctrlIdx - the index of the control (SynthDef argument)
value - the new value of the control
See Also:
set( int, float )

set

public void set(java.lang.String[] ctrlNames,
                float[] values)
         throws java.io.IOException
Sets a list of the node's control parameters to new values. This sends a /n_set message to the server. If the node is a Synth, it adjusts the synth's control values. If the node is a Group, it adjusts the control values of all synths in this group and subgroups of this group.

Parameters:
ctrlNames - an array of the names of the controls (SynthDef arguments)
values - an array of the new values of the controls. Each array element corresponds to the control name in ctrlNames at the same array index. the array sizes of ctrlNames and values must be equal.
Throws:
java.io.IOException - if an error occurs while sending the OSC message
See Also:
setMsg( String[], float[] )

setMsg

public de.sciss.net.OSCMessage setMsg(java.lang.String[] ctrlNames,
                                      float[] values)
Creates an OSC /n_set message to adjust a list of the node's control parameters to new values. Sending this message to a Synth adjusts the synth's control values. Sending this message to a Group adjusts the control values of all synths in this group and subgroups of this group.

Parameters:
ctrlNames - an array of the names of the controls (SynthDef arguments)
values - an array of the new values of the controls. Each array element corresponds to the control name in ctrlNames at the same array index. the array sizes of ctrlNames and values must be equal.
See Also:
set( String[], float[] )

set

public void set(int[] ctrlIndices,
                float[] values)
         throws java.io.IOException
Sets a list of the node's control parameters to new values. This sends a /n_set message to the server. If the node is a Synth, it adjusts the synth's control values. If the node is a Group, it adjusts the control values of all synths in this group and subgroups of this group.

Parameters:
ctrlIndices - an array of the indices of the controls (SynthDef arguments)
values - an array of the new values of the controls. Each array element corresponds to the control index in ctrlIndices at the same array index. the array sizes of ctrlIndices and values must be equal.
Throws:
java.io.IOException - if an error occurs while sending the OSC message
See Also:
setMsg( int[], float[] )

setMsg

public de.sciss.net.OSCMessage setMsg(int[] ctrlIndices,
                                      float[] values)
Creates an OSC /n_set message to adjust a list of the node's control parameters to new values. Sending this message to a Synth adjusts the synth's control values. Sending this message to a Group adjusts the control values of all synths in this group and subgroups of this group.

Parameters:
ctrlIndices - an array of the indices of the controls (SynthDef arguments)
values - an array of the new values of the controls. Each array element corresponds to the control index in ctrlIndices at the same array index. the array sizes of ctrlIndices and values must be equal.
See Also:
set( int[], float[] )

fill

public void fill(java.lang.String[] ctrlNames,
                 int[] numControls,
                 float[] values)
          throws java.io.IOException
Sets ranges of the node's control parameters to new values. This sends a /n_fill message to the server. If the node is a Synth, it adjusts the synth's control values. If the node is a Group, it adjusts the control values of all synths in this group and subgroups of this group.

Parameters:
ctrlNames - the names of the first control to change
numControls - the numbers of successive controls to change
values - an array of the new values of the controls. the sizes of ctrlNames, numControls and values must be equal.
Throws:
java.io.IOException - if an error occurs while sending the OSC message
See Also:
fillMsg( String[], int[], float[] )

fillMsg

public de.sciss.net.OSCMessage fillMsg(java.lang.String[] ctrlNames,
                                       int[] numControls,
                                       float[] values)
Creates an OSC /n_fill message to adjust ranges of the node's control parameters to new values. Sending this message to a Synth adjusts the synth's control values. Sending this message to a Group adjusts the control values of all synths in this group and subgroups of this group.

Parameters:
ctrlNames - the names of the first control to change
numControls - the numbers of successive controls to change
values - an array of the new values of the controls. the sizes of ctrlNames, numControls and values must be equal.
See Also:
fill( String[], int[], float[] )

fill

public void fill(int[] ctrlIndices,
                 int[] numControls,
                 float[] values)
          throws java.io.IOException
Sets ranges of the node's control parameters to new values. This sends a /n_fill message to the server. If the node is a Synth, it adjusts the synth's control values. If the node is a Group, it adjusts the control values of all synths in this group and subgroups of this group.

Parameters:
ctrlIndices - the indices of the first control to change
numControls - the numbers of successive controls to change
values - an array of the new values of the controls. the sizes of ctrlIndices, numControls and values must be equal.
Throws:
java.io.IOException - if an error occurs while sending the OSC message
See Also:
fillMsg( int[], int[], float[] )

fillMsg

public de.sciss.net.OSCMessage fillMsg(int[] ctrlIndices,
                                       int[] numControls,
                                       float[] values)
Creates an OSC /n_fill message to adjust ranges of the node's control parameters to new values. Sending this message to a Synth adjusts the synth's control values. Sending this message to a Group adjusts the control values of all synths in this group and subgroups of this group.

Parameters:
ctrlIndices - the indices of the first control to change
numControls - the numbers of successive controls to change
values - an array of the new values of the controls. the sizes of ctrlIndices, numControls and values must be equal.
See Also:
fill( int[], int[], float[] )

setn

public void setn(java.lang.String[] ctrlNames,
                 float[][] values)
          throws java.io.IOException
Sets ranges of the node's control parameters to new values. This sends a /n_setn message to the server. If the node is a Synth, it adjusts the synth's control values. If the node is a Group, it adjusts the control values of all synths in this group and subgroups of this group.

Parameters:
ctrlNames - the names of the first control to change
values - an array of arrays of the new values of the controls. each outer array corresponds to one element in ctrlNames, hence ctrlNames.length and values.length must be equal.
Throws:
java.io.IOException - if an error occurs while sending the OSC message
See Also:
setnMsg( String[], float[][] )

setnMsg

public de.sciss.net.OSCMessage setnMsg(java.lang.String[] ctrlNames,
                                       float[][] values)
Creates an OSC /n_setn message to adjust ranges of the node's control parameters to new values. Sending this message to a Synth adjusts the synth's control values. Sending this message to a Group adjusts the control values of all synths in this group and subgroups of this group.

Parameters:
ctrlNames - the names of the first control to change
values - an array of arrays of the new values of the controls. each outer array corresponds to one element in ctrlNames, hence ctrlNames.length and values.length must be equal.
See Also:
setn( String[], float[][] )

setn

public void setn(int[] ctrlIndices,
                 float[][] values)
          throws java.io.IOException
Sets ranges of the node's control parameters to new values. This sends a /n_setn message to the server. If the node is a Synth, it adjusts the synth's control values. If the node is a Group, it adjusts the control values of all synths in this group and subgroups of this group.

Parameters:
ctrlIndices - the indices of the first control to change
values - an array of arrays of the new values of the controls. each outer array corresponds to one element in ctrlNames, hence ctrlNames.length and values.length must be equal.
Throws:
java.io.IOException - if an error occurs while sending the OSC message
See Also:
setnMsg( int[], float[][] )

setnMsg

public de.sciss.net.OSCMessage setnMsg(int[] ctrlIndices,
                                       float[][] values)
Creates an OSC /n_setn message to adjust ranges of the node's control parameters to new values. Sending this message to a Synth adjusts the synth's control values. Sending this message to a Group adjusts the control values of all synths in this group and subgroups of this group.

Parameters:
ctrlIndices - the indices of the first control to change
values - an array of arrays of the new values of the controls. each outer array corresponds to one element in ctrlNames, hence ctrlNames.length and values.length must be equal.
See Also:
setn( String[], float[][] )

map

public void map(int[] ctrlIndices,
                int[] busIndices)
         throws java.io.IOException
Maps a list of the node's control parameters to be automatically read from global control busses. This sends a /n_map message to the server. If the node is a Synth, it maps the synth's controls. If the node is a Group, it maps the controls of all synths in this group and subgroups of this group.

Parameters:
ctrlIndices - an array of the indices of the controls (SynthDef arguments)
busIndices - an array of the indices of the control busses. Each array element corresponds to the control index in ctrlIndices at the same array index. the array sizes of ctrlIndices and values must be equal. whenever a bus index is -1 the mapping is undone. Mapping is also undone by successive /n_set, /n_setn or /n_fill commands.
Throws:
java.io.IOException - if an error occurs while sending the OSC message
See Also:
mapMsg( int[], int[] )

mapMsg

public de.sciss.net.OSCMessage mapMsg(int[] ctrlIndices,
                                      int[] busIndices)
Creates an OSC /n_map message to map a list of the node's control parameters to be automatically read from global control busses. Sending this message to a Synth maps the synth's controls. Sending this message to a Group maps the controls of all synths in this group and subgroups of this group.

Parameters:
ctrlIndices - an array of the indices of the controls (SynthDef arguments)
busIndices - an array of the indices of the control busses. Each array element corresponds to the control index in ctrlIndices at the same array index. the array sizes of ctrlIndices and values must be equal. whenever a bus index is -1 the mapping is undone. Mapping is also undone by successive /n_set, /n_setn or /n_fill commands.
See Also:
map( int[], int[] )

map

public void map(java.lang.String[] ctrlNames,
                int[] busIndices)
         throws java.io.IOException
Maps a list of the node's control parameters to be automatically read from global control busses. This sends a /n_map message to the server. If the node is a Synth, it maps the synth's controls. If the node is a Group, it maps the controls of all synths in this group and subgroups of this group.

Parameters:
ctrlNames - an array of the names of the controls (SynthDef arguments)
busIndices - an array of the names of the control busses. Each array element corresponds to the control name in ctrlNames at the same array index. the array sizes of ctrlNames and values must be equal. whenever a bus index is -1 the mapping is undone. Mapping is also undone by successive /n_set, /n_setn or /n_fill commands.
Throws:
java.io.IOException - if an error occurs while sending the OSC message
See Also:
mapMsg( String[], int[] )

mapMsg

public de.sciss.net.OSCMessage mapMsg(java.lang.String[] ctrlNames,
                                      int[] busIndices)
Creates an OSC /n_map message to map a list of the node's control parameters to be automatically read from global control busses. Sending this message to a Synth maps the synth's controls. Sending this message to a Group maps the controls of all synths in this group and subgroups of this group.

Parameters:
ctrlNames - an array of the names of the controls (SynthDef arguments)
busIndices - an array of the names of the control busses. Each array element corresponds to the control name in ctrlNames at the same array index. the array sizes of ctrlNames and values must be equal. whenever a bus index is -1 the mapping is undone. Mapping is also undone by successive /n_set, /n_setn or /n_fill commands.
See Also:
map( String[], int[] )

map

public void map(int[] ctrlIndices,
                Bus[] busses)
         throws java.io.IOException
Maps a list of the node's control parameters to be automatically read from global control busses. This sends a /n_map message to the server. If the node is a Synth, it maps the synth's controls. If the node is a Group, it maps the controls of all synths in this group and subgroups of this group.

Parameters:
ctrlIndices - an array of the indices of the controls (SynthDef arguments)
busses - an array of control busses. Each array element corresponds to the control index in ctrlIndices at the same array index. the array sizes of ctrlIndices and busses must be equal. whenever a bus is null the mapping is undone. Mapping is also undone by successive /n_set, /n_setn or /n_fill commands.
Throws:
java.io.IOException - if an error occurs while sending the OSC message
See Also:
mapMsg( int[], Bus[] )

mapMsg

public de.sciss.net.OSCMessage mapMsg(int[] ctrlIndices,
                                      Bus[] busses)
Creates an OSC /n_map message to map a list of the node's control parameters to be automatically read from global control busses. Sending this message to a Synth maps the synth's controls. Sending this message to a Group maps the controls of all synths in this group and subgroups of this group.

Parameters:
ctrlIndices - an array of the indices of the controls (SynthDef arguments)
busses - an array of control busses. Each array element corresponds to the control index in ctrlIndices at the same array index. the array sizes of ctrlIndices and busses must be equal. whenever a bus is null the mapping is undone. Mapping is also undone by successive /n_set, /n_setn or /n_fill commands.
See Also:
map( int[], Bus[] )

map

public void map(java.lang.String[] ctrlNames,
                Bus[] busses)
         throws java.io.IOException
Maps a list of the node's control parameters to be automatically read from global control busses. This sends a /n_map message to the server. If the node is a Synth, it maps the synth's controls. If the node is a Group, it maps the controls of all synths in this group and subgroups of this group.

Parameters:
ctrlNames - an array of the names of the controls (SynthDef arguments)
busses - an array of control busses. Each array element corresponds to the control name in ctrlNames at the same array index. the array sizes of ctrlNames and busses must be equal. whenever a bus is null the mapping is undone. Mapping is also undone by successive /n_set, /n_setn or /n_fill commands.
Throws:
java.io.IOException - if an error occurs while sending the OSC message
See Also:
mapMsg( String[], Bus[] )

mapMsg

public de.sciss.net.OSCMessage mapMsg(java.lang.String[] ctrlNames,
                                      Bus[] busses)
Creates an OSC /n_map message to map a list of the node's control parameters to be automatically read from global control busses. Sending this message to a Synth maps the synth's controls. Sending this message to a Group maps the controls of all synths in this group and subgroups of this group.

Parameters:
ctrlNames - an array of the names of the controls (SynthDef arguments)
busses - an array of control busses. Each array element corresponds to the control name in ctrlNames at the same array index. the array sizes of ctrlNames and busses must be equal. whenever a bus is null the mapping is undone. Mapping is also undone by successive /n_set, /n_setn or /n_fill commands.
See Also:
map( String[], Bus[] )

map

public void map(java.lang.String ctrlName,
                Bus bus)
         throws java.io.IOException
Convenience method for a single mapping.

Throws:
java.io.IOException

mapMsg

public de.sciss.net.OSCMessage mapMsg(java.lang.String ctrlName,
                                      Bus bus)
Convenience method for a single mapping.


mapn

public void mapn(int[] ctrlIndices,
                 int[] busIndices,
                 int[] numControls)
          throws java.io.IOException
Maps a list of the node's control parameters to be automatically read from global control busses. This sends a /n_map message to the server. If the node is a Synth, it maps the synth's controls. If the node is a Group, it maps the controls of all synths in this group and subgroups of this group.

Parameters:
ctrlIndices - an array of the indices of the controls (SynthDef arguments)
busIndices - an array of the indices of the control busses. Each array element corresponds to the control index in ctrlIndices at the same array index. the array sizes of ctrlIndices and values must be equal. whenever a bus index is -1 the mapping is undone. Mapping is also undone by successive /n_set, /n_setn or /n_fill commands.
numControls - an array of the number of successive controls to map. this array must have the same size as ctrlIndices.
Throws:
java.io.IOException - if an error occurs while sending the OSC message
See Also:
mapnMsg( int[], int[], int[] )

mapnMsg

public de.sciss.net.OSCMessage mapnMsg(int[] ctrlIndices,
                                       int[] busIndices,
                                       int[] numControls)
Creates an OSC /n_map message to map a list of the node's control parameters to be automatically read from global control busses. Sending this message to a Synth maps the synth's controls. Sending this message to a Group maps the controls of all synths in this group and subgroups of this group.

Parameters:
ctrlIndices - an array of the indices of the controls (SynthDef arguments)
busIndices - an array of the indices of the control busses. Each array element corresponds to the control index in ctrlIndices at the same array index. the array sizes of ctrlIndices and values must be equal. whenever a bus index is -1 the mapping is undone. Mapping is also undone by successive /n_set, /n_setn or /n_fill commands.
numControls - an array of the number of successive controls to map. this array must have the same size as ctrlIndices.
See Also:
mapn( int[], int[], int[] )

mapn

public void mapn(java.lang.String[] ctrlNames,
                 int[] busIndices,
                 int[] numControls)
          throws java.io.IOException
Maps a list of the node's control parameters to be automatically read from global control busses. This sends a /n_mapn message to the server. If the node is a Synth, it maps the synth's controls. If the node is a Group, it maps the controls of all synths in this group and subgroups of this group.

Parameters:
ctrlNames - an array of the names of the controls (SynthDef arguments)
busIndices - an array of the names of the control busses. Each array element corresponds to the control name in ctrlNames at the same array index. the array sizes of ctrlNames and values must be equal. whenever a bus index is -1 the mapping is undone. Mapping is also undone by successive /n_set, /n_setn or /n_fill commands.
numControls - an array of the number of successive controls to map. this array must have the same size as ctrlNames.
Throws:
java.io.IOException - if an error occurs while sending the OSC message
See Also:
mapnMsg( String[], int[], int[] )

mapnMsg

public de.sciss.net.OSCMessage mapnMsg(java.lang.String[] ctrlNames,
                                       int[] busIndices,
                                       int[] numControls)
Creates an OSC /n_mapn message to map a list of the node's control parameters to be automatically read from global control busses. Sending this message to a Synth maps the synth's controls. Sending this message to a Group maps the controls of all synths in this group and subgroups of this group.

Parameters:
ctrlNames - an array of the names of the controls (SynthDef arguments)
busIndices - an array of the names of the control busses. Each array element corresponds to the control name in ctrlNames at the same array index. the array sizes of ctrlNames and values must be equal. whenever a bus index is -1 the mapping is undone. Mapping is also undone by successive /n_set, /n_setn or /n_fill commands.
numControls - an array of the number of successive controls to map. this array must have the same size as ctrlNames.
See Also:
mapn( String[], int[], int[] )

mapn

public void mapn(int[] ctrlIndices,
                 Bus[] busses)
          throws java.io.IOException
Maps a list of the node's control parameters to be automatically read from global control busses. This sends a /n_mapn message to the server. If the node is a Synth, it maps the synth's controls. If the node is a Group, it maps the controls of all synths in this group and subgroups of this group.

Parameters:
ctrlIndices - an array of the indices of the controls (SynthDef arguments)
busses - an array of control busses. Each array element corresponds to the control name in ctrlNames at the same array index. the array sizes of ctrlNames and busses must be equal. The number of successive controls is determined by each bus'es numChannels! Mapping is undone by successive /n_set, /n_setn or /n_fill commands.
Throws:
java.io.IOException - if an error occurs while sending the OSC message
See Also:
mapnMsg( int[], Bus[] )

mapnMsg

public de.sciss.net.OSCMessage mapnMsg(int[] ctrlIndices,
                                       Bus[] busses)
Creates an OSC /n_mapn message to map a list of the node's control parameters to be automatically read from global control busses. Sending this message to a Synth maps the synth's controls. Sending this message to a Group maps the controls of all synths in this group and subgroups of this group.

Parameters:
ctrlIndices - an array of the indices of the controls (SynthDef arguments)
busses - an array of control busses. Each array element corresponds to the control name in ctrlNames at the same array index. the array sizes of ctrlNames and busses must be equal. The number of successive controls is determined by each bus'es numChannels! Mapping is undone by successive /n_set, /n_setn or /n_fill commands.
See Also:
mapn( int[], Bus[] )

mapn

public void mapn(java.lang.String[] ctrlNames,
                 Bus[] busses)
          throws java.io.IOException
Maps a list of the node's control parameters to be automatically read from global control busses. This sends a /n_mapn message to the server. If the node is a Synth, it maps the synth's controls. If the node is a Group, it maps the controls of all synths in this group and subgroups of this group.

Parameters:
ctrlNames - an array of the names of the controls (SynthDef arguments)
busses - an array of control busses. Each array element corresponds to the control name in ctrlNames at the same array index. the array sizes of ctrlNames and busses must be equal. The number of successive controls is determined by each bus'es numChannels! Mapping is undone by successive /n_set, /n_setn or /n_fill commands.
Throws:
java.io.IOException - if an error occurs while sending the OSC message
See Also:
mapnMsg( String[], Bus[] )

mapnMsg

public de.sciss.net.OSCMessage mapnMsg(java.lang.String[] ctrlNames,
                                       Bus[] busses)
Creates an OSC /n_mapn message to map a list of the node's control parameters to be automatically read from global control busses. Sending this message to a Synth maps the synth's controls. Sending this message to a Group maps the controls of all synths in this group and subgroups of this group.

Parameters:
ctrlNames - an array of the names of the controls (SynthDef arguments)
busses - an array of control busses. Each array element corresponds to the control name in ctrlNames at the same array index. the array sizes of ctrlNames and busses must be equal. The number of successive controls is determined by each bus'es numChannels! Mapping is undone by successive /n_set, /n_setn or /n_fill commands.
See Also:
mapn( String[], Bus[] )

release

public void release()
             throws java.io.IOException
Releases a node with default release time.

Throws:
java.io.IOException
See Also:
release( float )

release

public void release(float releaseTime)
             throws java.io.IOException
Releases a node. This assumes that that the Synth represented by the node or the synths in the Group represented by the node have specified a control named "gate" (usually used by an EnvGen envelope generator UGen). This sends a /n_set message for the "gate" control to the server.

Parameters:
releaseTime - the time in seconds for the envelope to be released, or 0.0f to use the envelope's default release time
Throws:
java.io.IOException - if an error occurs while sending the OSC message
See Also:
releaseMsg( float )

releaseMsg

public de.sciss.net.OSCMessage releaseMsg()
Creates an OSC /n_set message to release a node with default release time.

See Also:
releaseMsg( float )

releaseMsg

public de.sciss.net.OSCMessage releaseMsg(float releaseTime)
Creates an OSC /n_set message to release a node. This assumes that that the Synth represented by the node or the synths in the Group represented by the node have specified a control named "gate" (usually used by an EnvGen envelope generator UGen).

Parameters:
releaseTime - the time in seconds for the envelope to be released, or 0.0f to use the envelope's default release time
See Also:
release( float )

trace

public void trace()
           throws java.io.IOException
Sends an OSC /n_trace message to the server. The server will print debugging information about the node into its terminal window. If the node is a synth, this information includes the current input and output values for UGens in the synth. If the node is a group, this information includes the node IDs inside the group.

Throws:
java.io.IOException - if an error occurs while sending the OSC message
See Also:
traceMsg()

traceMsg

public de.sciss.net.OSCMessage traceMsg()
Creates an OSC /n_trace message for the node. When this message is sent to the server, it will print debugging information about the node into its terminal window. If the node is a synth, this information includes the current input and output values for UGens in the synth. If the node is a group, this information includes the node IDs inside the group.

See Also:
trace()

query

public void query()
           throws java.io.IOException
A debugging method that prints the results of an OSC /n_query message into the server's default print stream.

Throws:
java.io.IOException - if an error occurs while sending the OSC message
See Also:
query( PrintStream ), Server.getPrintStream()

query

public void query(java.io.PrintStream out)
           throws java.io.IOException
A debugging method that prints the results of an OSC /n_query message into a given print stream.

Parameters:
out - the stream to print out, e.g. System.err
Throws:
java.io.IOException - if an error occurs while sending the OSC message
See Also:
query()

queryMsg

public de.sciss.net.OSCMessage queryMsg()

register

public void register()
              throws java.io.IOException
Throws:
java.io.IOException

register

public void register(boolean assumePlaying)
              throws java.io.IOException
Throws:
java.io.IOException

moveBefore

public void moveBefore(Node aNode)
                throws java.io.IOException
Moves the node before another node in the server graph.

Parameters:
aNode - the node before which this node is moved
Throws:
java.io.IOException - if the OSC message could not be sent
See Also:
moveBeforeMsg( Node )
Warning:
this does not set the group field of the node. the group field is only updated by a NodeWatcher

moveBeforeMsg

public de.sciss.net.OSCMessage moveBeforeMsg(Node aNode)
Creates an OSC /n_before message. When the message is sent to the server, this node is moved before another node in the server graph.

Parameters:
aNode - the node before which this node is moved
See Also:
moveBefore( Node )
Warning:
this does not set the group field of the node. the group field is only updated by a NodeWatcher

moveAfter

public void moveAfter(Node aNode)
               throws java.io.IOException
Moves the node after another node in the server graph.

Parameters:
aNode - the node after which this node is moved
Throws:
java.io.IOException - if the OSC message could not be sent
See Also:
moveAfterMsg( Node )
Warning:
this does not set the group field of the node. the group field is only updated by a NodeWatcher

moveAfterMsg

public de.sciss.net.OSCMessage moveAfterMsg(Node aNode)
Creates an OSC /n_after message. When the message is sent to the server, this node is moved before another node in the server graph.

Parameters:
aNode - the node before which this node is moved
See Also:
moveAfter( Node )
Warning:
this does not set the group field of the node. the group field is only updated by a NodeWatcher

moveToHead

public void moveToHead(Group aGroup)
                throws java.io.IOException
Moves the node to the head of a group in the server graph.

Parameters:
aGroup - the group to whose head this node is moved. if null the server's default group is used
Throws:
java.io.IOException - if the OSC message could not be sent
See Also:
moveToHeadMsg( Group )
Warning:
this does not set the group field of the node. the group field is only updated by a NodeWatcher

moveToHeadMsg

public de.sciss.net.OSCMessage moveToHeadMsg(Group aGroup)
Creates an OSC /g_head message. When the message is sent to the server, this node is moved to the head of a group in the server graph.

Parameters:
aGroup - the group to whose head this node is moved. if null the server's default group is used
See Also:
moveToHead( Group )
Warning:
this does not set the group field of the node. the group field is only updated by a NodeWatcher

moveToTail

public void moveToTail(Group aGroup)
                throws java.io.IOException
Moves the node to the tail of a group in the server graph.

Parameters:
aGroup - the group to whose tail this node is moved. if null the server's default group is used
Throws:
java.io.IOException - if the OSC message could not be sent
See Also:
moveToTailMsg( Group )
Warning:
this does not set the group field of the node. the group field is only updated by a NodeWatcher

moveToTailMsg

public de.sciss.net.OSCMessage moveToTailMsg(Group aGroup)
Creates an OSC /g_tail message. When the message is sent to the server, this node is moved to the tail of a group in the server graph.

Parameters:
aGroup - the group to whose tail this node is moved. if null the server's default group is used
See Also:
moveToTail( Group )
Warning:
this does not set the group field of the node. the group field is only updated by a NodeWatcher

printOn

public void printOn(java.io.PrintStream stream)

getParent

public javax.swing.tree.TreeNode getParent()
Specified by:
getParent in interface javax.swing.tree.TreeNode