Pipe Out CHOP
The Pipe Out CHOP can be used to transmit data out of TouchDesigner to other processes running on a remote machine using a network connection. If the other process is another TouchDesigner process, a Pipe In CHOP in that process can be used to receive the data. Multiple PipeIn CHOPs can connect to a PipeOut CHOP.
For more information on how to connect two Touch processes running on different machines with a Pipe In and Pipe Out CHOP, see the Pipe In CHOP.
Parameters - Pipe Out Page
Originate - Determines whether the Pipe In CHOP or the Pipe Out CHOP tries to initiate the communication. Only one of the two CHOPs attempting to connect can have this flag on, either the Pipe In or Pipe Out, but not both. One side must originate, and the other side must have that location specified.
Server Address - The computer name or IP address of the server computer. This address is a standard WWW address, such as '
foo' or '
foo.bar.com'. You can use an IP address (e.g.
100.123.45.78) or the computer's network name can be entered. If you put "
localhost", it means the other end of the pipe is on the same computer.
Server Port - The network port to use.
Active - When Off, data is not sent.
Send Input - On/off toggle for sending the data connected to the Pipe Out CHOP's input.
Send Current Sample Only - This parameter is only enabled if the Pipe Out CHOP is not time sliced (See Common Page of parameters). If On, it only sends the current frame's sample. If Off, it sends all data between this frame and the last frame TouchDesigner cooked at. The difference arises when TouchDesigner is not cooking 60 frames per second and is skipping frames. If playback skips by 3 animation frames between screen draws, the On case sends only one frame of data, and the Off case sends 3 frames of data (a "time slice" in TouchDesigner-speak).
Single Sample - In single sample mode, this parameter determines which sample to send; the sample at frame 1 or the current sample.
Send All Data - When the button is pressed, sends all the channel names and their data once in one burst.
Script / Send Script - Use these parameters to send a one-time textport command through the pipe.
Cook Every Frame - Turn this on to make sure this CHOP gets processed every frame. Usually CHOPs do not get processed every frame unless they are directly involved with some aspect of the geometry being displayed.
Send Monitor Pulses - Sends pulses (a single null character) once a frame, to monitor the connection. This keeps the connection active, and keeps the Pipe In CHOP aware of the connection status so it can properly report its state.
Echo Messages to Console - Print all outgoing data to the Console which can be opened from the Dialogs menu. See this option in the Pipe In CHOP for more details.
There is a System Environment variable called
TOUCH_MIN_PACKET (default 64 bytes) for PipeOut messages. This variable sets the minimum packet size for all messages. Messages are padded out to this size. Messages shorter than a specific amount tends to break connections on some computers.
Programming the Pipe Out CHOP
The Pipe Out CHOP allows you to program an interface from CHOPs to other programs, output devices or Touch running on another computer.
This is done by sending simple human-readable ASCII commands from the CHOP, via a TCP/IP (network) connection.
Source Code Example - You can find a compilable example of a Pipe Out application in the designer installation directory:
If you are having problems with Pipe In and Pipe Out CHOPs not connecting, try turning off the Windows Firewall in the Security Center (or any other firewall application you have running).
See also TCP/IP In DAT.