#N canvas 329 61 893 639 12;
#X msg 294 174 1 2 3;
#X msg 315 223 set dog ferret;
#X msg 301 200 set mouse banana;
#X obj 620 318 oscparse;
#X msg 281 147 4 5 weasel 6 7 rat;
#X obj 48 468 oscparse;
#X msg 48 273 -1 1 2 mule 4 5;
#X obj 48 401 oscformat -f b wombat;
#X text 452 245 creation arguments are OSC address, f 18;
#X msg 311 338 disconnect;
#X obj 281 367 netsend -u -b;
#X msg 298 312 connect localhost 5000;
#X text 33 602 see also:;
#X obj 254 603 list;
#X obj 194 603 netsend;
#X msg 56 301 format;
#X text 111 301 no format;
#X text 128 325 a 'blob';
#X text 156 351 mixtures;
#X obj 29 10 oscformat;
#X text 663 602 updated for Pd version 0.51.;
#X text 101 9 - convert lists to OSC packets;
#X listbox 620 347 34 0 0 0 - - - 0;
#X obj 281 254 oscformat cat horse pig;
#X listbox 48 498 24 0 0 0 - - - 0;
#X obj 636 283 print OSC-packet;
#X obj 65 435 print OSC-packet;
#X obj 111 603 fudiformat;
#X obj 36 34 oscparse;
#X text 101 35 - parse OSC packets into Pd messages;
#N canvas 804 89 528 518 reference 0;
#X obj 8 52 cnv 5 500 5 empty empty INLET: 8 18 0 13 #202020 #000000 0;
#X obj 8 151 cnv 2 500 2 empty empty OUTLET: 8 12 0 13 #202020 #000000 0;
#X obj 8 188 cnv 2 500 2 empty empty ARGUMENTS: 8 12 0 13 #202020 #000000 0;
#X obj 7 284 cnv 5 500 5 empty empty empty 8 18 0 13 #202020 #000000 0;
#X obj 7 368 cnv 5 500 5 empty empty INLET: 8 18 0 13 #202020 #000000 0;
#X obj 7 420 cnv 2 500 2 empty empty OUTLET: 8 12 0 13 #202020 #000000 0;
#X obj 6 493 cnv 5 500 5 empty empty empty 8 18 0 13 #202020 #000000 0;
#X obj 28 19 oscformat;
#X obj 28 337 oscparse;
#X text 116 66 list - list to format into a OSC packet.;
#X text 74 86 set <list> - set one or more addresses.;
#X text 138 253 1) list - list of one or more addresses;
#X text 95 382 list - OSC packet to convert to Pd list messages.;
#X text 117 429 list - Pd list messages from OSC packets., f 42;
#X text 39 109 format <symbol> -;
#X text 164 109 characters set format types: 'b' (blob) \, 'i' (integer) \, 'f' (float) or 's' (string)., f 43;
#X text 99 218 -f <symbol>: sets format as in the 'format' message;
#X obj 9 212 cnv 1 500 1 empty empty flag: 8 12 0 13 #7c7c7c #000000 0;
#X obj 9 243 cnv 1 500 1 empty empty args: 8 12 0 13 #7c7c7c #000000 0;
#X obj 8 459 cnv 2 500 2 empty empty ARGUMENTS: 8 12 0 13 #202020 #000000 0;
#X text 116 161 list - converted OSC packet from lists.;
#X text 103 18 - convert lsts to OSC packets.;
#X text 93 337 - parse OSC packets into Pd list messages.;
#X text 139 470 NONE;
#X restore 701 30 pd reference;
#X text 795 30 <= click;
#X obj 7 65 cnv 1 880 1 empty empty empty 8 12 0 13 #000000 #000000 0;
#X obj 6 585 cnv 1 880 1 empty empty empty 8 12 0 13 #000000 #000000 0;
#X text 47 74 [oscformat] makes OSC (Open Sound Control) packets (byte by byte) suitable for sending over the network via netsend (in UDP binary mode). The OSC address (the strings between the slashes) are given by the creation arguments or by "set" messages., f 116;
#X text 495 118 [oscparse] takes lists of numbers interpreting them as the bytes in an OSC message and outputs a list containing \, first \, the symbols making up the address of the OSC packet \, and following that \, numbers and symbols as present in the OSC message., f 52;
#X text 250 508 Note: there's no way using [oscparse] to distinguish between floats and integers \, nor to see blobs unambiguously. OSC messages may be combined in "bundles". If [oscparse] receives a bundle it simply parses all the messages in the bundle in the order they appear \, and ignores the bundle's time tag., f 87;
#X obj 620 253 netreceive -u -b 5000;
#X obj 298 288 loadbang;
#X text 384 368 send as UDP \, binary;
#X text 430 208 set message changes address, f 15;
#X text 608 213 receive OSC messages via UDP \, binary at port 5000, f 25;
#X text 40 146 OSC messages with numbers and --> symbols. OSC messages will contain only 'float' and 'string' data types \, except as shown below., f 33;
#X text 250 401 If a format is given (via the '-f' flag or 'format' message) [oscformat] interprets incoming data as integer \, float \, string or 'blob'. If the elements aren't exhausted at the end of the format string \, the default (float and symbol) conversions are made for the rest. Blobs are a list of bytes that start with an atom count followed by that number of elements. (If an elements is a symbol \, its first byte is sent). If the count is negative \, the entire remaining message is included in the blob (but the OSC parser will report the actual number of elements)., f 87;
#X msg 64 326 format b;
#X msg 36 245 5 6 7 squirrel;
#X msg 71 350 format fib;
#X msg 76 373 format ifisfi;
#N canvas 238 347 606 217 more-about-OSC 0;
#X text 37 41 OSC is a complicated networking protocol (FUDI \, as used in [netsend] and [netreceive] is simpler and better but less widely used). The [oscparse] and [oscformat] objects make no attempt to deal with timetags or aggregates of packets \, nor with streaming OSC. Also \, no attempt is made here to clearly distinguish between the OSC address (symbols) and the following data \, nor between blobs and lists of numbers - it is assumed that you know what types the message should contain. You can alternatively use the OSC objects from the "mrpeach" library which have more features than these., f 77;
#X restore 64 541 pd more-about-OSC;
#X connect 0 0 23 0;
#X connect 1 0 23 0;
#X connect 2 0 23 0;
#X connect 3 0 22 0;
#X connect 4 0 23 0;
#X connect 5 0 24 0;
#X connect 6 0 7 0;
#X connect 7 0 5 0;
#X connect 7 0 26 0;
#X connect 9 0 10 0;
#X connect 11 0 10 0;
#X connect 15 0 7 0;
#X connect 23 0 10 0;
#X connect 37 0 3 0;
#X connect 37 0 25 0;
#X connect 38 0 11 0;
#X connect 44 0 7 0;
#X connect 45 0 7 0;
#X connect 46 0 7 0;
#X connect 47 0 7 0;
