Array node
Array Join
Concatenate or interleave two arrays. Combine arrays end-to-end or alternate their elements to create merged sequences.
Inputs
| Port | Type | Default |
|---|---|---|
| Array AThe first list. Leaving it unconnected is treated as empty, so the result is just B. | any | — |
| Array BThe second list. Leaving it unconnected is treated as empty, so the result is just A. | any | — |
| ModeConcatenate puts all of A then all of B; Interleave alternates A, B, A, B and appends the leftovers of the longer list. Values outside the list fall back to Concatenate. | int | 0 |
Outputs
| Port | Type |
|---|---|
| Result | any |
| Count | int |
How It Works
Array Join merges two arrays using the selected Mode:
- 0 — Concatenate: Places all elements of Array B after Array A. Result length = A.count + B.count.
- 1 — Interleave: Alternates elements from A and B: [A₀, B₀, A₁, B₁, ...]. If one array is longer, its remaining elements are appended at the end.
Use Cases
- Merging datasets: Concatenate two sensor arrays into a single combined buffer.
- Stereo interleaving: Interleave left and right channel data for stereo audio or dual-channel processing.
- Building sequences: Concatenate multiple arrays to build longer sequences from shorter segments.
Tips
- To split an interleaved array back into two, use Array Filter or Array Sample with every-Nth mode.
- For merging more than two arrays, chain multiple Array Join nodes.
- To merge element-wise into pairs (not alternating), use Array Zip instead.
Open Array Join in the interactive catalog →
Array Join 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.