[PD] [announce] netsend / netreceive for Max <-> Pd communication

Olaf Matthes olaf.matthes at gmx.de
Thu Jul 10 01:49:01 CEST 2003


okay, to avoid any confusion: in Pd's help patch for netsend some Max
objects called 'netsend' and 'netreceive' are mentioned (the link given
there does not work any longer...). These objects are different from the
ones I made and here is what's actually different:
- they only support UDP
- they only send messages consisting of <symbol> <float>
- the 'syntax' (i.e. how the patch has to look like) is different from
how it is done in Pd

With my objects I've tried to stick as close as possible to the Pd
objects (but I don't support the 'old' flag....). So everything you see
in the help patches for Pd can be done exactly the same way in Max.
But the text in the netreceive help patch from Pd 0.36 still states
"Incoming network messages appear in 'receive' objects;" This is no
longer true (unless the 'old' flag is set to explicitly switch back to
this old mode). 

To send messages of arbitrary length, the following (using 'l2s' from
zexy) should work:

[your list of arbitrary length with 23 floats and probably symbols]
 |
[l2s]
 |
[send $1]
 |
[netsend]

By converting a list to a symbol it shrinks down to a constant length of
always one symbol, regardless the original list length. netreceive will
unpack it into a list again before sending it through it's outlet.

Olaf


jose manuel berenguer schrieb:
> 
> hello
> 
> as far as i know, netsend and netreceive work with lists ... i
> haven't tested the limit of length, but if you send the message, say,
> 
> (0 1 2 3 4 5 6 7 8 9 10 11)
> 
> and you connect the left outlet of netreceive to a print object  you
> will see the list 0 1 2 3 4 5 6 7 8 9 10 11 on the terminal
> 
> if you connect this left outlet to a message (set $1), and the outlet
> of this message to an empty message box, you will get 0
> 
> if you connect it to a message (set $1 $2), you will get  0 1
> 
> (set $1 $2 $3) will give 0 1 2, and so on...until $9...
> 
> if you connect the left outlet of netreceive to an unpack object you
> will retrieve all integers sent...
> 
> if you start the list by a symbol, you can retrieve it by forcing
> unpack to process a symbol (s) in its first analyzed atom
> 
> if you place a symbol in any other place of your outgoing list, you
> should also inform unpack about the position...
> 
> the list fuu 4 4 4 fiii
> 
> should be read by unpack s 0 0 0 s.
> 
> you need, indeed, connect outlets 1 and 5 to symbol boxes...
> 
> in max, you need only connect the left outlet of netreceive to a
> prepend set object connected to an empty message box...
> 
> jmb
> 
> >I remember some time ago I tried a pd netsend/netreceive object for Max and it
> >would only accept single element messages, for instance, 3 64; would be
> >accepted as just 3. Is this object you're talking about a different one that
> >will accept messages with multiple elements?
> >
> >Pall
> >
> >sjs
> >http://www.this.is/harmony
> >http://130.208.220.190/panse
> >
> >
> >_______________________________________________
> >PD-list mailing list
> >PD-list at iem.at
> >http://iem.at/cgi-bin/mailman/listinfo/pd-list
> 
> --
> Jose Manuel Berenguer
> jmbeal at telefonica.net +34932857046 +34696538403
> jmberenguer at cccb.org  +34933064128
> http://212.163.142.140/jmb/index.html
> http://sonoscop.cccb.org http://ocaos.cccb.org/caos
> Sonoscop/Orquesta del Caos. CCCB. Montalegre, 5. 08001 Barcelona. Spain
> 
> _______________________________________________
> PD-list mailing list
> PD-list at iem.at
> http://iem.at/cgi-bin/mailman/listinfo/pd-list




More information about the Pd-list mailing list