Project: processing-sc / Class: Synth

Class: Synth

Represents a single SuperCollider synthesis node.


Variables

  • int nodeID - unique node identifier (numbered from 2000)
  • Server server - host server
  • Group group - container group
  • String synthname - the name of the SynthDef from which this object was created
  • boolean created - true if this synth object has been created on the server

Methods

Synth (String synthname)
Synth (String synthname, Server server)
Initialise a new synth object, defaulting to the local server Server.local (localhost:57110). Note that this does not create the object on the server-side - creation must be done subsequently with synth.create(), or one of the addToXXX() methods.
void addToHead (Group group)
void addToHead ()
void create ()
Create at the head of the specified group, or the server's default group.
void addToTail (Group group)
void addToTail ()
Create at the tail of the specified group, or the server's default group.
void addBefore (Node node)
Create immediately before the specified node.
void addAfter (Node node)
Create immediately after the specified node.
void free()
Free the synth object.
void set (String param, int value)
void set (String param, float value)
void set (String param, String value)

Set the value of one of the synth's Control parameters.

void set (String [] params, int [] values)
void set (String [] params, float [] values)
void set (String [] params, String [] values)

Set the values of multiple parameters of the same type.

Like create(), this method uses the value of server.latency for accurate event scheduling.

void get (String param, Object target, String action)

Get the value of a Control parameter. The return value is passed by calling the method action on object target, which must take arguments:
(int nodeID, String argument, float value)