Tutorial : Global Arrays

Global-array concept very helpful in complex workspaces environnements, has been introduced in HH5. It provides an efficient way to share global values (data, color, string) inside a workspace or the network. The main advantages are:

  • global values shared in all the workspaces,
  • very simple and CPU efficients,
  • can be automatically shared with connected computers,
  • can be automatically assigned to OSC messages on receive and send,
  • can be saved independently as files containing all values or only part of them.

define a global array

To use global array, the first thing is to create global-array module of the data type you want (data, color, string).

example of a global-array module

Then set a name for the global-array, in this example we use MY-GLOBAL-ARRAY-NAME.

example of MY-GLOBAL-ARRAY-NAME global-array

use global arrays

A complete set of modules is available to set or get values of global-arrays.

To set one value of a global-array at an index position you can use one of the following module:

To get one value of a global-array at an index position you can use one of the following module:

get or set the one value

To set all values of a global array you can use one of the following module:

To get all values of a global array you can use one of the following module:

get or set the all values

save to files & load from file values

All global array values can be saved to a file or loaded from a file with the module:

load or save global arrays

share global array on the network

Global array values can be shared to connected computers.

The first thing to do is to activate the share active and send global arrays options in the setup-panel-tab-networksetup-panel-tab-network.

share setup

Then on each global-array module, you can define more precisely if the global array is sent and/or received and the transfert speed. The resend to network button forces the module to resend all its values to all connected computers.

share setup

send and receive OSC messages

The module global-array-data-osc can be used to send or receive automatically OSC messages for the global array.

debug

It can be hard to debug global arrays. In the setup-panel-tab-expert you can find few commands to open the global-array-viewer-panel and modules-finder-panel. They are special tools which can help you to find and inspect global arrays in your workspace.

See also

Usine Tutorial

version 5.0.210313

Edit All Pages