The slots box can read or modify the values of a slot – that is, a "field" or parameter – of an instance or global variable.
Instances1 are created out of classes via factory boxes.
All information provided in this section is valid for both types of boxes.
A slots box is always created from a given object box, and has the same reference. To create a slots box :
Cmd
click in a patch editor,
type a class name
validate while keeping SHIFT
pressed.
![]() | The structure and morphology of a slots box is similar to those of the corresponding factory box. The slots box also has a "self", and a number of parametric slots. |
For instance, the slots box created out of a chord instance has the same inputs and outputs : "self", "midicents", "velocity", "duration", "midi channel". It also has the same icon. | ![]() |
Using "slots" allows to read and modify the parameters of an object without creating new instances out of new factory boxes :
The "self" input of slots must be connected to the "self" output of an object, so that the slots of the object can be read and/or modified.
To read the value(s) of an instance's slot :
connect the instance to the "self" input of slots,
evaluate the corresponding output of slots.
To modify the value(s) of an instance's slot :
connect the instance to the "self" input of slots,
enter new values in the relevant input of slots,
evaluate slots,
reopen the instance editor.
Note that the reference of the object hasn't changed, despite the fact the object's content has changed.
The same procedures can apply to factory boxes.
| ![]() |
Once an object belongs to an abstraction, its slots can't be accessed from the abstraction. It is sometimes wiser not to generate useless new instances :
![]() | To modify an instance from the inside of an abstraction :
|
When the initial instance is refreshed, it will also be modified, since both instance have the same reference.
An actual object created at runtime, out of a given class. In OM, more specifically, an object created when evaluating a factory box. An instance can be saved as a global variable.
⤷ SHIFT
click on an outlet – especially the first outlet representing the self, the whole object – of a factory box to materialize an instance.
An instance of OM object that has been saved in order to be used in other programs. Global variables are visible from the Library
window and stored as .omi files in the Globals
folder of the workspace.