Skip to content

Instantly share code, notes, and snippets.

@efreeman
Created Feb 8, 2014
Embed
What would you like to do?
An example Pure Data patch for receiving and parsing messages from a local socket. For more information, see: http://euanfreeman.co.uk/network-messages-in-pure-data/
#N canvas 491 234 366 267 10;
#X declare -lib maxlib -lib mrpeach -lib moocow;
#X obj 47 61 tgl 15 0 empty empty empty 17 7 0 10 -4034 -13381 -13381
0 1;
#X text 63 60 <-- Connected?;
#X obj 164 25 import maxlib mrpeach moocow;
#X obj 26 108 bytes2any;
#X obj 26 25 tcpserver 34567;
#X obj 26 206 outlet;
#X obj 161 76 outlet;
#X obj 26 140 unpack f f f;
#X obj 60 185 outlet;
#X obj 95 164 outlet;
#X text 86 107 <-- Convert from bytestream to message;
#X text 105 139 <-- Parse floats from message;
#X connect 0 0 6 0;
#X connect 3 0 7 0;
#X connect 4 0 3 0;
#X connect 4 1 0 0;
#X connect 7 0 5 0;
#X connect 7 1 8 0;
#X connect 7 2 9 0;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment