aka.datagram for 64-bit systems

DiGiTaLFX's icon

Hey all. I've been avoiding the 64-bit jump entirely, but just upgraded to Max 8 (not to mention the impending macOS changes) so I'm now finally looking into converting old patches. One of the objects I rely quite heavily on is [aka.datagram] which I guess is now long unmaintained, so I'm looking for advice on what I should replace it with? I guess this is a possible opportunity for [node.script], but if possible I'd prefer to keep everything within Max itself.

Cheers :)

abs11's icon

hi,

there are 2 more possibillities, which should work.

1) using an external
The sadam Library
http://www.sadam.hu/hu/node/1
Streaming & Networking

1) using java

best,
abs

DiGiTaLFX's icon

Thanks abs, the sadam Library looks pretty interesting. Shame it's not open source, but I guess you can't win them all. Think I'd probably take node's dgram module over java if I have to go down that route seeing as node is completely integrated into Max. I'll have a play with my options and see what works :)

Dg's icon

Hi,
I'm also trying to find something to replace [aka.datagram] in order to convert a patcher and port it to windows.
I'm not able to get sadam.udpSender working as it should.
Anyone has tryed something that works in replacement of aka.datagram?

Max Patch
Copy patch and select New From Clipboard in Max.


Shane's icon

I am in need of something as well. Same situation - upgrading to 64 bit and held off forever. Sadam.lib is what I used but networking doesn‘t work on windows anymore and the last supported version from oct 20 2012 is only 16 bit. Have any of you found solutions ? For me it’s the mac udpsender object wraps the bytes in something and the sadam udp sender was just raw

DiGiTaLFX's icon

I haven't tested this properly, but I believe using the following in a [node.script] object should work:

const maxAPI = require("max-api");
var host = "127.0.0.1";
var port = 1234;
var dgram = require('dgram');
var client = dgram.createSocket("udp4");
maxAPI.addHandler("send", message => {
    var buffer = new Buffer(message);
    client.send(buffer, 0, buffer.length, port, host);
});

Then insert [presend send] before your data and see what happens! Would love to hear back if you get this working (in my case I ended up switching to OSC as the hardware I was using added for it in the mean time, but this would be useful to know).