A unit holds an object like an Instr, NDef, Bus, Spline, SFP (soundfile player) etc.
Each unit
Name is implemented by the object driver and should usually return a useful unique readable name.
string
The object you added
the object
returns an MxIOletsApp which can be used to access specific the units inlets by name or iterated over like an array.
an MxIOletsApp
returns an MxIOletsApp which can be used to access specific outlets by name or iterated over like an array.
shorthand for .inlets
an MxIOletsApp
shorthand for .outlets
an MxIOletsApp
Connect the default out of this unit to "that".
that |
an inlet, a channel fader |
channel@slot position on the grid. master channel is inf
Point
Disconnect and remove the unit from the grid
this
Move the unit to a different position. This moves it to a new Group as well. Overwrites anything that might be there.
point |
channel@slot |
this
Move the unit by a channel@slot offset. Overwrites anything that might be there.
vector |
Point representing the offset. eg. 1@0 will move it to the next channel |
Duplicate the object to the slot directly below it, insert an open space if there is already something there.
num |
How many times to duplicate |
unit or array of units
Copies the unit to a specific point, overwriting anything that might be there.
toPoint |
destination point |
new unit
Copies the unit by a channel@slot offset, overwriting anything that might be there.
vector |
channel@slot offset Point |
new unit
Disconnect all inlets and outlets of this unit
this
Each unit has an environment which the driver can use to store state variables. The proto of this environment is the driver handler functions, so these methods are also available. This can be used by a unit (for instance a Document for live coding) to enter the variable space of another unit. see also MxUnit varPooling
function |
like Environmenent.use, a function executed in the unit's environment. |
result of the function
Stop the unit from playing. The Mx will continue to play
this
Play the unit if it is not already playing. Does not start the Mx
this
Stops then restarts the unit. An Instr will automatically restart itself if its source code is edited. Accuracy of the respawn depends on the implementation in the object's driver, but in the worst case it just stops and then plays the object.
this
is unit playing ?
boolean
Spec of the unit itself. Note that a unit may have multiple outlets of varying spec. ~spec is implemented by the driver and it depends how the object wishes to declare itself. Most objects in super collider have a single spec.
Spec subclass
Of interest to the timeline to know how long you are going to play for
float or nil (meaning endless)
Open a gui. The gui implementation is defined in the object driver file.
parent |
parent view, window or nil |
bounds |
bounds rect or nil |
this
stream |