Streams as compositions
Think of each stream as a composition. Add streams to a project, collapse nodes into a stream of their own and place it again, give a stream inputs and outputs, and play it from Controls.
A stream is a composition: a graph of nodes that does one thing, like a camera’s clean-up, a look, a detector and its overlay, or a whole show. A project holds as many streams as you like, and each one can be built from others, the way a song is built from parts or a film from scenes.
Add a stream
Section titled “Add a stream”Choose Stream › New stream… and name it. Studio adds an empty stream to the project and opens it in a tab of its own. Stream › Rename stream… and Stream › Delete stream… act on the stream whose tab is showing; a deleted stream comes back with Edit › Undo.
The Outliner lists every stream in the project, with its nodes. Double-click one to open its tab. ⌘W closes a tab without touching the stream, and ⇧⌘T reopens the last one you closed.
All of a project’s streams play together: Play starts every one, and Stop stops every one. Each stream that isn’t placed inside another runs as a stream of its own.
Make a part, and use it again
Section titled “Make a part, and use it again”Build something once, then reuse it as a single card. Select the nodes that make up the part and press ⇧⌘G, or right-click them and choose to collapse them into a subgraph:
- The nodes and the wires between them are saved as a new stream of the project, and a card that places it takes their place.
- Each wire that crossed the edge of the selection now runs through a pin of that card, so the stream does exactly what it did before.
- Inside the new stream, each of those pins is a Graph Input or Graph Output node: the ports the part offers wherever it’s placed.
The part is placed by reference. Right-click its card and choose Step inside, change it, and every place that uses it changes too. Use the trail at the top of the graph to step back out. A stream that’s placed in another runs only where it’s placed, not on its own as well.
To turn a subgraph back into plain nodes, step inside it and press Unlock. Its nodes come back as a copy at the level you were on, and the stream it placed stays in the project.
Give a stream its own pins
Section titled “Give a stream its own pins”Add Graph Input and Graph Output nodes to a stream yourself to decide what it takes and what it gives when it’s placed: a picture in and a picture out for an effect, a number in for an amount, a trigger in for a cue. Each is named, and has one type, like any other pin.
Graph Inputs and Controls
Section titled “Graph Inputs and Controls”A stream’s Graph Inputs are also how you play it live. The Controls view shows each Graph Input of the open stream as a control: a slider or a field for a number, a switch for a Boolean, and a field for anything else it can write. Change one, and the stream follows at once.
Any setting of a node can become one. Select the node, and in Properties choose Expose as a Graph Input for the setting: it becomes an input of the node, fed by a new Graph Input node, and it shows in Controls. Expose the few values you want to perform with, and leave the rest of the graph alone while the show runs.
Parts from code and from modules
Section titled “Parts from code and from modules”Two kinds of subgraph are read only, and say so above the graph when you step inside:
- A graph generator is Python that builds nodes and wires, such as one camera node for each camera on the machine. It shows in the Add node search under the project’s own nodes, and places what it builds as a subgraph. When you change its code, Refresh from code builds it again. See Graph generators.
- A stream that a module brings is placed as it was published, and updates when the module does. See Marketplace and modules.
Unlock makes either one plain nodes of your own to edit, which no refresh or update reaches again.
Streams that talk to each other
Section titled “Streams that talk to each other”A wire joins pins in one stream. Streams that should stay independent, in one project or in many, on one machine or on several, share data through a MoQ relay instead: one stream sends a pin to the relay, and any other reads it there. Either can be stopped, changed and played again without the other noticing. See Share between streams, and the tutorial for a worked example.