Value boxes are convenient for displaying and storing small and / or atomic data in visual programs.
Two other containers are proposed for larger list of values or objects
STORE is a simple container object, whose unique slot is
value to set or read the data.
Note: TEXTBUFFER can be a useful substitute for
STOREwith certain type of textual or numeric data requiring editing
If the objects stored in a list are standard-objects (that is, instances of standard-classes, as opposed to basic atomic Lisp values), and if they need to be edited graphically, the
COLLECTION object might in turn come handy.
COLLECTIONonly accepts a list of objects of the same type.
COLLECTION will display the “miniview” of the collected objects, either superimposed on top of each other (e.g. for BPF, BPF, etc.) or, more generally, stacked as a column of displays (e.g. for
MIDI-TRACK, score objects, etc.)
COLLECTION automatically adopts the “type” of collected objects, so it is possible from the
COLLECTION editor to add new objects of that type in the list. In order to create a new empty collection of a given type, just type
collection <type> in the patch editor.
If the type of collected object has a graphical editor,
COLLECTION will provide that same editor for display and editing its contents. The “regular” editor of the class is incremented with a bar at the top, containing the following controls:
Display the current index and total number of stored objects.
Switch to the previous / next elements of the collection (← / → buttons) — also available via Ctrl/⌘ + ← / → on the keyboard.
Add a new item of the same type to the collection (+ button).
Delete the current item (- button).
When available for the type of object, the “Show all” option enables simultaneous display of all the objects in the collection, while still editing the “Current” object at the front.
COLLECTIONcorresponds to all the objects of type
_xxx_-LIBfrom OpenMusic (e.g.
BPC-Lib, etc.). In general the conversion is done automatically when importing OpenMusic patches to OM#.