Array node

Array Get

Read an element from an array by index. Returns the element at the specified position along with the array's count, first element, last element, and whether the array is empty — a single node for all basic array inspection.

Inputs

PortTypeDefault
ArrayThe list to read from. Cable any array stream here — floats, points, colors, text; a single point or color also opens into its components.any—
IndexWhich element to pick, counting from 0. Negative counts back from the end, so -1 is the last; anything past either end returns nothing while Count and First and Last still report.int0

Outputs

PortType
Elementany
Countint
Firstany
Lastany
Is Emptybool

How It Works

Array Get reads the element at the specified Index from the incoming array. The index is zero-based: 0 is the first element, 1 is the second, and so on.

Negative indices wrap from the end: -1 returns the last element, -2 returns the second-to-last. If the index is out of bounds, the Element output will be empty (no value).

The node also outputs convenience values — Count (total number of elements), First and Last elements, and Is Empty (true when the array has zero elements).

Use Cases

  • Accessing specific channels: After splitting EEG data into an array, use Array Get to extract a specific electrode channel by index.
  • Peeking at boundaries: Use the First and Last outputs to monitor the newest and oldest values in a rolling data buffer.
  • Conditional logic: Connect Is Empty to a Switch or Logic node to handle the case where no data has arrived yet.
  • Indexed selection: Connect a MIDI CC or UI control to the Index input to dynamically select which array element to display or process.

Tips

  • Negative indices are supported: -1 gives the last element, -2 the second-to-last, etc.
  • If the array is empty, all outputs except Count (0) and Is Empty (true) will be empty.
  • For extracting a range of elements instead of a single one, use Array Slice.
  • Pair with Array Set to build and then read back from a dynamic collection.

Open Array Get in the interactive catalog →

Array Get is one of 381 nodes in Grafit Pro.

Free download. Every feature for 7 days, no card. Then €99.99 once — or keep playing your projects as a Player.

More Array nodes