OpenMusic

Visual Programming | Computer-Assisted Composition

Navigation : Previous | Next

Objects - Factory Boxes

In OM, objects are created and used in patches via “ factory “ boxes. A factory box refers to a class[1] and allows to create instances[2] - exemplars, in other words -, of this class.

This dual aspect of formalized computation, associated with direct manual interaction on the musical material, is a fundamental feature of OM, which makes the factory box a major patch component.

Factory boxes are accessed via the Classes menu or can be added in a patch from the Library window.

How To Add a Box into a Patch Editor

References :

  1. Class

A category of objects sharing common properties - characteristics and behaviour. A class specifies the internal structure and behaviour of an object. In OM, it is represented in a patch by a factory box that can produce an instance of a class.

See also : Object, Instance

  1. Instance

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.

Contents :

Navigation : Previous | Next