Utility node
Macro
A Macro encapsulates any set of nodes into a single, reusable node with custom input and output ports. Select one or more nodes in the graph editor and press Cmd+G to group them into a Macro. The selected nodes disappear into the Macro, which appears as a single node with a header and whatever ports you define. Double-click the Macro to enter it and edit the internal graph. Macros can be nested inside other Macros for hierarchical, modular organization.
How to Create a Macro
- Select nodes: In the graph editor, select the nodes you want to group. You can select multiple nodes by clicking with Shift held, or by dragging a selection rectangle.
- Group: Press Cmd+G or use the context menu to create a Macro from the selection.
- Result: The selected nodes are moved inside the new Macro. Any cables that were connecting the selected nodes to outside nodes are automatically bridged through new Port nodes on the Macro boundary.
The Macro appears in the graph as a single node with a colored header. Its name defaults to "Macro" but can be renamed in the inspector.
How to Add Inputs and Outputs
Inputs and outputs on a Macro are defined by Port nodes inside the Macro's internal graph.
Adding an Input
- Double-click the Macro to enter it.
- Create a Port node inside the Macro.
- Connect an external cable to the Macro — or connect the Port node's output to an internal node's input.
- The Port node appears as an input port on the Macro's exterior.
Adding an Output
- Double-click the Macro to enter it.
- Create a Port node inside the Macro.
- Connect an internal node's output to the Port node's input.
- The Port node appears as an output port on the Macro's exterior.
Configuring Port Types
Port nodes default to type Any (passthrough). To enforce a specific type:
- Select the Port node inside the Macro.
- Open the Settings tab in the inspector.
- Set the desired type (Float, Int, String, Bool, Color, etc.).
- Optionally set a custom name, default value, and min/max range for numeric types.
The configured type determines the port color and type shown on the Macro's exterior, and enables automatic type conversion for incoming data.
Editing the Internal Graph
- Enter a Macro: Double-click its header in the graph editor. The view transitions into the Macro's internal graph, showing all the nodes and connections inside.
- Navigate back: Click the breadcrumb navigation at the top of the graph editor, or press the back button, to return to the parent graph.
- Full editing: Inside a Macro, you have full access to all graph editing features — adding nodes, connecting cables, adjusting parameters, and creating nested Macros.
Port nodes inside the Macro are visually distinct from regular nodes. They appear as compact, headerless bridges with a single input and output, labeled with the port name that is displayed on the Macro's exterior.
Nesting Macros
Macros can contain other Macros to any depth. This enables hierarchical organization:
- Top-level graph: High-level data flow between major components.
- First-level Macros: Functional modules (e.g., "Audio Processing", "Visual Output", "MIDI Control").
- Second-level Macros: Sub-components within each module (e.g., "FFT Analysis", "Band Extraction" inside "Audio Processing").
The breadcrumb navigation at the top of the graph editor shows the full hierarchy path, allowing you to jump to any level directly.
Use Cases
- Reusable Components: Build a complex effect (such as a particle system with specific field and lighting settings) once, then duplicate the Macro to reuse it without rebuilding the internal logic.
- Modular Organization: Break a large project into logical sections. A live performance graph might have separate Macros for "Audio Input", "Visual Effects", "MIDI Mapping", and "Output Routing".
- Simplifying Complex Graphs: Hide implementation details inside Macros to keep the top-level graph readable. A 50-node signal processing chain becomes a single "Signal Processor" Macro with clean input/output ports.
- Iterative Development: Develop and test a component inside a Macro in isolation, then integrate it into the larger graph by connecting its ports.
- Team Collaboration: When multiple people work on a project, Macros define clear boundaries and interfaces between components, reducing conflicts.
- Template Building Blocks: Create a library of Macro patterns (e.g., "Smooth Color Transition", "Beat Detector", "Position Grid") that you copy into new projects as starting points.
Tips
- Naming: Rename the Macro in the inspector to describe its function (e.g., "Audio FFT", "Color Palette", "MIDI CC Map"). This name appears on the node header in the parent graph.
- Port naming: Give each Port node inside the Macro a descriptive custom name in its Settings tab. These names appear as port labels on the Macro's exterior, making the interface self-documenting.
- Port ordering: Ports appear on the Macro in the order their Port nodes were created inside the Macro. Rearrange by deleting and recreating Port nodes in the desired order.
- Type safety: Configure Port node types explicitly (instead of leaving them as Any) to enforce type checking at the Macro boundary and enable automatic type conversion.
- Debugging: To inspect values flowing through a Macro, add UI Text or Particle Debug nodes inside it, or temporarily connect output Port nodes to intermediate points in the internal graph.
- Deleting a Macro: When a Macro is deleted, all nodes inside it are also removed. If you need to keep the internal nodes, ungroup the Macro first (select it and use the context menu).
- Cables across boundaries: When you create a Macro from selected nodes, any cables that cross the selection boundary are automatically converted to Port nodes. You do not need to manually create Port nodes for pre-existing connections.
- Performance: Macros have no runtime overhead beyond the cost of the nodes they contain. The grouping is purely organizational — there is no additional processing step for the Macro boundary itself.
Open Macro in the interactive catalog →
Macro 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.