echo

SpecialNodes echo

input ports:
Name Type Description Optional

in0

?0

first input

yes

in1

?1

second input

yes

…​

in N-1

? N-1

final input

yes

output ports:
Name Type Description Optional

out0

?0

echo of first input or default value

yes

out1

?1

echo of second input default value

yes

…​

out N-1

? N-1

echo of final input or default value

yes

echo reads each of its used inputs (i.e., those with links connected). Then, for each used output port, it echoes the value that was read from the corresponding input port (if that input port is used), or the default value for that type (if that input port is unused).

For each pair of corresponding input and output ports, either the input port may be unused, or the output port may be unused, but not both. So, while the table above describes every port on the node as optional, in fact half of the ports on the node must be connected.

echo is useful for synchronizing independent data flows. Suppose that two operations are to be performed, and only after they are performed, a third operation is to be performed that requires a string identifier as an input. We can perform the synchronization – ensuring that the two prerequisite actions are completed before sending the identifier to the third operation – using an echo node, like this:

SpecialNodes echo2

The first two inputs are the result or completion signals from the first and second operations. The third input is the identifier we wish to send to the third operation, once the first two operations have been performed. The first two outputs are left disconnected – in this case, we don’t care about their values, but simply the fact that they have arrived, indicating that the first and second operations have completed. (If we did need to make use of their result values, we could connect the first and/or second output to the destination that should receive those values.) The third output is connected to the third operation that should be sent an identifier only after the first two operations have completed.

Note that the synchronization performed here is multifaceted:

  • the independent first and second operations are coordinated. the echo node does not fire until both of them have completed, regardless of the order in which that happens

  • the two upstream operations are coordinated with the third, downstream, operation. The echo node sends no output (i.e., triggers no downstream nodes) until all of its used inputs have arrived