public abstract class Node extends Object implements Constants, TreeNode
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
.
NodeTreeManager
,
NodeWatcher
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
Modifier | Constructor and Description |
---|---|
protected |
Node(Server server)
Creates a Node representation.
|
protected |
Node(Server server,
int nodeID)
Creates a Node representation for a given
node ID.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(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(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(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.
|
String |
getName()
Queries the custom name of the node.
|
int |
getNodeID()
Queries the node's identifier.
|
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(String[] ctrlNames,
Bus[] busses)
Maps a list of the node's control parameters to be automatically read from global control busses.
|
void |
map(String[] ctrlNames,
int[] busIndices)
Maps a list of the node's control parameters to be automatically read from global control busses.
|
void |
map(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(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(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(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(String[] ctrlNames,
Bus[] busses)
Maps a list of the node's control parameters to be automatically read from global control busses.
|
void |
mapn(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(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(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(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(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(String[] ctrlNames,
float[] values)
Sets a list of the node's control parameters to new values.
|
void |
set(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(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(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(String[] ctrlNames,
float[][] values)
Sets ranges of the node's control parameters to new values.
|
void |
setName(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(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. |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
children, getAllowsChildren, getChildAt, getChildCount, getIndex, isLeaf
protected Node(Server server, int nodeID)
server
- the Server
at which the Node
residesnodeID
- the identifier of the Node
protected Node(Server server)
server
- the Server
at which the Node
residespublic void setName(String name)
name
- a name for the node, or null
public String getName()
null
if no name has been givenpublic Group getGroup()
Group
of the Node
or null
if no group has been assigned.public Node getPredNode()
null
.null
public Node getSuccNode()
null
.null
public Server getServer()
Server
protected void setGroup(Group group)
NodeWatcher
for example
when it receives a /n_info
message.group
- the node's new Group
or null
(if the node is invalidated)protected void setPredNode(Node predNode)
NodeWatcher
for example
when it receives a /n_info
message.predNode
- the node's new predecessor Node
or null
protected void setSuccNode(Node succNode)
NodeWatcher
for example
when it receives a /n_info
message.succNode
- the node's new successor Node
or null
public int getNodeID()
public boolean isPlaying()
NodeWatcher
.true
if the node exists on the server and is playing (not paused),
false
otherwiseprotected void setPlaying(boolean isPlaying)
NodeWatcher
.
Do not call it yourself.isPlaying
- true
if the node is playing
false
if the node is pausedpublic boolean isRunning()
NodeWatcher
.true
if the node exists on the server,
false
otherwiseprotected void setRunning(boolean isRunning)
NodeWatcher
.
Do not call it yourself.isRunning
- true
if the node exists on the server,
false
otherwisepublic boolean equals(Object o)
public int hashCode()
hashCode
in class Object
equals( Object )
public void free() throws IOException
/n_free
message to the server.IOException
- if an error occurs while sending the OSC messagefreeMsg()
public de.sciss.net.OSCMessage freeMsg()
/n_free
message for the node.OSCMessage
which can be sent to the serverfree()
public void run() throws IOException
[ /n_run, <nodeID>, 1 ]
message to the server.IOException
- if an error occurs while sending the OSC messagerunMsg()
public void run(boolean flag) throws IOException
/n_run
message to the server.flag
- false
to pause the node, true
to resume the node.IOException
- if an error occurs while sending the OSC messagerunMsg( boolean )
public de.sciss.net.OSCMessage runMsg()
[ /n_run, <nodeID>, 1 ]
message for the node.OSCMessage
which can be sent to the serverrun()
public de.sciss.net.OSCMessage runMsg(boolean flag)
/n_run
message for the node.flag
- false
to pause the node, true
to resume the node.OSCMessage
which can be sent to the serverrun( boolean )
public void set(String ctrlName, float value) throws IOException
/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.ctrlName
- the name of the control (SynthDef
argument)value
- the new value of the controlIOException
- if an error occurs while sending the OSC messagesetMsg( String, float )
public de.sciss.net.OSCMessage setMsg(String ctrlName, float value)
/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.ctrlName
- the name of the control (SynthDef
argument)value
- the new value of the controlset( String, float )
public void set(int ctrlIdx, float value) throws IOException
/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.ctrlIdx
- the index of the control (SynthDef
argument)value
- the new value of the controlIOException
- if an error occurs while sending the OSC messagesetMsg( int, float )
public de.sciss.net.OSCMessage setMsg(int ctrlIdx, float value)
/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.ctrlIdx
- the index of the control (SynthDef
argument)value
- the new value of the controlset( int, float )
public void set(String[] ctrlNames, float[] values) throws IOException
/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.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.IOException
- if an error occurs while sending the OSC messagesetMsg( String[], float[] )
public de.sciss.net.OSCMessage setMsg(String[] ctrlNames, float[] values)
/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.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.set( String[], float[] )
public void set(int[] ctrlIndices, float[] values) throws IOException
/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.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.IOException
- if an error occurs while sending the OSC messagesetMsg( int[], float[] )
public de.sciss.net.OSCMessage setMsg(int[] ctrlIndices, float[] values)
/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.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.set( int[], float[] )
public void fill(String[] ctrlNames, int[] numControls, float[] values) throws IOException
/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.ctrlNames
- the names of the first control to changenumControls
- the numbers of successive controls to changevalues
- an array of the new values of the controls. the sizes
of ctrlNames
, numControls
and values
must be equal.IOException
- if an error occurs while sending the OSC messagefillMsg( String[], int[], float[] )
public de.sciss.net.OSCMessage fillMsg(String[] ctrlNames, int[] numControls, float[] values)
/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.ctrlNames
- the names of the first control to changenumControls
- the numbers of successive controls to changevalues
- an array of the new values of the controls. the sizes
of ctrlNames
, numControls
and values
must be equal.fill( String[], int[], float[] )
public void fill(int[] ctrlIndices, int[] numControls, float[] values) throws IOException
/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.ctrlIndices
- the indices of the first control to changenumControls
- the numbers of successive controls to changevalues
- an array of the new values of the controls. the sizes
of ctrlIndices
, numControls
and values
must be equal.IOException
- if an error occurs while sending the OSC messagefillMsg( int[], int[], float[] )
public de.sciss.net.OSCMessage fillMsg(int[] ctrlIndices, int[] numControls, float[] values)
/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.ctrlIndices
- the indices of the first control to changenumControls
- the numbers of successive controls to changevalues
- an array of the new values of the controls. the sizes
of ctrlIndices
, numControls
and values
must be equal.fill( int[], int[], float[] )
public void setn(String[] ctrlNames, float[][] values) throws IOException
/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.ctrlNames
- the names of the first control to changevalues
- 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.IOException
- if an error occurs while sending the OSC messagesetnMsg( String[], float[][] )
public de.sciss.net.OSCMessage setnMsg(String[] ctrlNames, float[][] values)
/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.ctrlNames
- the names of the first control to changevalues
- 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.setn( String[], float[][] )
public void setn(int[] ctrlIndices, float[][] values) throws IOException
/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.ctrlIndices
- the indices of the first control to changevalues
- 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.IOException
- if an error occurs while sending the OSC messagesetnMsg( int[], float[][] )
public de.sciss.net.OSCMessage setnMsg(int[] ctrlIndices, float[][] values)
/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.ctrlIndices
- the indices of the first control to changevalues
- 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.setn( String[], float[][] )
public void map(int[] ctrlIndices, int[] busIndices) throws IOException
/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.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.IOException
- if an error occurs while sending the OSC messagemapMsg( int[], int[] )
public de.sciss.net.OSCMessage mapMsg(int[] ctrlIndices, int[] busIndices)
/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.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.map( int[], int[] )
public void map(String[] ctrlNames, int[] busIndices) throws IOException
/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.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.IOException
- if an error occurs while sending the OSC messagemapMsg( String[], int[] )
public de.sciss.net.OSCMessage mapMsg(String[] ctrlNames, int[] busIndices)
/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.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.map( String[], int[] )
public void map(int[] ctrlIndices, Bus[] busses) throws IOException
/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.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.IOException
- if an error occurs while sending the OSC messagemapMsg( int[], Bus[] )
public de.sciss.net.OSCMessage mapMsg(int[] ctrlIndices, Bus[] busses)
/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.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.map( int[], Bus[] )
public void map(String[] ctrlNames, Bus[] busses) throws IOException
/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.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.IOException
- if an error occurs while sending the OSC messagemapMsg( String[], Bus[] )
public de.sciss.net.OSCMessage mapMsg(String[] ctrlNames, Bus[] busses)
/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.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.map( String[], Bus[] )
public void map(String ctrlName, Bus bus) throws IOException
IOException
public de.sciss.net.OSCMessage mapMsg(String ctrlName, Bus bus)
public void mapn(int[] ctrlIndices, int[] busIndices, int[] numControls) throws IOException
/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.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
.IOException
- if an error occurs while sending the OSC messagemapnMsg( int[], int[], int[] )
public de.sciss.net.OSCMessage mapnMsg(int[] ctrlIndices, int[] busIndices, int[] numControls)
/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.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
.mapn( int[], int[], int[] )
public void mapn(String[] ctrlNames, int[] busIndices, int[] numControls) throws IOException
/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.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
.IOException
- if an error occurs while sending the OSC messagemapnMsg( String[], int[], int[] )
public de.sciss.net.OSCMessage mapnMsg(String[] ctrlNames, int[] busIndices, int[] numControls)
/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.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
.mapn( String[], int[], int[] )
public void mapn(int[] ctrlIndices, Bus[] busses) throws IOException
/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.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.IOException
- if an error occurs while sending the OSC messagemapnMsg( int[], Bus[] )
public de.sciss.net.OSCMessage mapnMsg(int[] ctrlIndices, Bus[] busses)
/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.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.mapn( int[], Bus[] )
public void mapn(String[] ctrlNames, Bus[] busses) throws IOException
/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.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.IOException
- if an error occurs while sending the OSC messagemapnMsg( String[], Bus[] )
public de.sciss.net.OSCMessage mapnMsg(String[] ctrlNames, Bus[] busses)
/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.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.mapn( String[], Bus[] )
public void release() throws IOException
IOException
release( float )
public void release(float releaseTime) throws IOException
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.releaseTime
- the time in seconds for the envelope to be released, or 0.0f
to use the envelope's default release timeIOException
- if an error occurs while sending the OSC messagereleaseMsg( float )
public de.sciss.net.OSCMessage releaseMsg()
/n_set
message to release a node with default release time.releaseMsg( float )
public de.sciss.net.OSCMessage releaseMsg(float releaseTime)
/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).releaseTime
- the time in seconds for the envelope to be released, or 0.0f
to use the envelope's default release timerelease( float )
public void trace() throws IOException
/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.IOException
- if an error occurs while sending the OSC messagetraceMsg()
public de.sciss.net.OSCMessage traceMsg()
/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.trace()
public void query() throws IOException
/n_query
message into the server's default
print stream.IOException
- if an error occurs while sending the OSC messagequery( PrintStream )
,
Server.getPrintStream()
public void query(PrintStream out) throws IOException
/n_query
message into a given print stream.out
- the stream to print out, e.g. System.err
IOException
- if an error occurs while sending the OSC messagequery()
public de.sciss.net.OSCMessage queryMsg()
public void register() throws IOException
IOException
public void register(boolean assumePlaying) throws IOException
IOException
public void moveBefore(Node aNode) throws IOException
aNode
- the node before which this node is movedIOException
- if the OSC message could not be sentmoveBeforeMsg( Node )
public de.sciss.net.OSCMessage moveBeforeMsg(Node aNode)
/n_before
message. When the message is
sent to the server, this node is moved before another node in the server graph.aNode
- the node before which this node is movedmoveBefore( Node )
public void moveAfter(Node aNode) throws IOException
aNode
- the node after which this node is movedIOException
- if the OSC message could not be sentmoveAfterMsg( Node )
public de.sciss.net.OSCMessage moveAfterMsg(Node aNode)
/n_after
message. When the message is
sent to the server, this node is moved before another node in the server graph.aNode
- the node before which this node is movedmoveAfter( Node )
public void moveToHead(Group aGroup) throws IOException
aGroup
- the group to whose head this node is moved.
if null
the server's default group is usedIOException
- if the OSC message could not be sentmoveToHeadMsg( Group )
public de.sciss.net.OSCMessage moveToHeadMsg(Group aGroup)
/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.aGroup
- the group to whose head this node is moved.
if null
the server's default group is usedmoveToHead( Group )
public void moveToTail(Group aGroup) throws IOException
aGroup
- the group to whose tail this node is moved.
if null
the server's default group is usedIOException
- if the OSC message could not be sentmoveToTailMsg( Group )
public de.sciss.net.OSCMessage moveToTailMsg(Group aGroup)
/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.aGroup
- the group to whose tail this node is moved.
if null
the server's default group is usedmoveToTail( Group )
public void printOn(PrintStream stream)
Copyright © 2015–2022 SciJava. All rights reserved.