Carnivore and max

PiD's icon

Im hoping this is the right place to post this.

Im using the Max Client from the Carnivore website http://rhizome.org/carnivore/ (i can post the code if needed), but when I load it into max it outputs the data packet as a string (i think) and it has quote marks round it.

I really need it to be output as a hex/decimal number.

Any help would be greatly appreciated

Léopold Frey's icon

Hi,

if your using CPE-max client with TCPClientReader.java & if you know a
bit of java it's pretty easy :

replace this line in the TCPClientReader.java

line 170 : outlet(4,payload); //send back body of packet

by :

outlet(4,Atom.parse(payload));

(or outlet(4,Atom.parse(payload.toUpperCase()));
// convert 5d to 5D)

It will separate each word as an atom.

Now integer atom will surely be converted as int in the max world but
you'll need something else to convert hexadecimal atoms to real number.

Hope this help

Léo