3.4. Trigger ports fire events and sometimes data

As you just saw, events are fired from trigger ports, which are special ports that some nodes have. Here are some examples of trigger ports:

The Started trigger port on the Fire on Start node fires a single event when the composition starts running. The Fired trigger port on the Fire Periodically node fires events at a rate determined by the node’s Seconds port. The Pressed trigger port on the Receive Mouse Buttons node fires an event each time the mouse button is pressed, and the Released trigger port fires an event each time the mouse button is released. The Received Frame trigger port on the Receive Live Video node fires events as it receives a stream of images from a camera.

Some trigger ports, like Started and Fired, fire just events. Other trigger ports, like Pressed, Released, and Received Frame, fire data (a piece of information) along with each event. The Pressed and Released ports fire the coordinates of the point where the mouse was pressed or released. The Received Frame port fires the video frame received from the camera. This data travels along with the event to the next node. When that node executes, it can use the data to do its job (such as drawing a shape at the given coordinates, or extracting an image from the given video frame).

Nodes with trigger ports are often responsible for bringing information into the composition from the outside world, such as video, audio, device input, and network messages. These nodes can be a good starting point when creating a composition. You can see a list of all nodes with trigger ports by searching the Node Library for trigger or fire.

As just mentioned, one way to watch what trigger ports are doing in a composition is to run the composition with Show Events enabled. Another way is to click on the trigger port, which opens a view called the Port Popover. As the composition runs, the Port Popover shows how recently the trigger port fired an event and what data (if any) came with the event.

If you click on the Port Popover, it becomes a small window that you can leave open as you continue using the Vuo Editor and perhaps open other Port Popovers.