Global Constant

Global constants are named values visible from any patch in the workspace. They come in Set/Get pairs: a Set module defines the constant and its value, and any number of Get modules can retrieve it elsewhere. Three data types are supported: data (float), string, and color. Global constants have no name suffix, are not saved in presets and are not loaded by global-array-save-load-file: their value is the one of the Set module. A global constant exists while its Set module exists: deleting the Set module, or closing its patch, removes the name. A Get module whose name is defined by no Set module keeps its last value.

Categories

Category Modules Description
Data (Float) 2 Define and retrieve float global constants
String 2 Define and retrieve string global constants
Color 2 Define and retrieve color global constants

Data (Float)

Define and retrieve numeric global constants.

Module Description
Global Constant DATA Set Value Define a float global constant by name and value
Global Constant DATA Get Value Retrieve the value of a float global constant by name

String

Define and retrieve text global constants.

Module Description
Global Constant String Set Value Define a string global constant by name and value
Global Constant String Get Value Retrieve the value of a string global constant by name

Color

Define and retrieve color global constants.

Module Description
Global Constant Color Set Value Define a color global constant by name and value
Global Constant Color Get Value Retrieve the value of a color global constant by name

See also

version 7.0.250921

Edit All Pages