Max output to C++
Dec 6, 2007 at 10:26am
Max output to C++
Hi, I’m new to max so please bear with me!
I want to get max to output integers on localhost (or any other way, I’m open to suggestions) and then for C++ to recieve the data for processing. I have been looking into the net.tcp.send object and osc but there is no documentation saying how to use the objects, or any step by step tutorials.
The OSC seemed to be more complicated than the mxj tcp object so I started with tcp object. There is no reference to it in any of the max documentation, however, I found an article on the Cycling 74 website which had a screenshot of the object patch. I basically copied it and ran it, but not surprisingly it printed failure.
Any advice you can give me will be very much appreciated.
Dec 6, 2007 at 10:27am
Me again. Just an update on my progress with the tcp.send object.
I have found the little help patch for the object within max but when I ran that it also printed failure. One of the outlet boxes is a number which is the “number of active packets (sent but no response received)”. This number increments as the message is sent through the object. But it always eventually prints failure.
I thought maybe it was my firewall and permissions with localhost but it made no difference when I turned the firewalls off.
Does anyone have experience with this object? Is windows stopping it somehow?
Am I misunderstanding the meaning of the failure aswell? Is it a failure to actually send the message or a failure of the message being transmitted to something?
Dec 6, 2007 at 11:05am
What are you running as a server process? Can you get tcp.send to work
Alex Matthews wrote:
Dec 6, 2007 at 12:08pm
Thanks for your quick reply.
I haven’t actually tried the receive object yet. I just wanted to see how the send one worked so I could then create code in C++ to receive the data.
Is the failure notice coming up because I have nothing actually receiving the data? I thought maybe it was due to the patch not being able to send the packet due to a firewall or some internal windows barrier.
I’ll try the send with the receive object and let you know what happens.
Do you know much about the Open Sound Control stuff? Is this easier to use to get max and C++ communicating?
Dec 6, 2007 at 7:07pm
Quote: firstname.lastname@example.org wrote on Thu, 06 December 2007 04:08
> Is the failure notice coming up because I have nothing actually receiving the data?
The TCP protocol has requires a receiver to acknowledge the data has arrived. With no receiver, you’ll get an error. If you just want to send packets out without checking to see if they got there, look at UDP.
> I’ll try the send with the receive object and let you know what happens.
OSC is a protocol, but not a transport mechanism. In other words, you send OSC over TCP, UDP, USB, RS232, etc. More here:
Dec 6, 2007 at 11:17pm
you might want to tryout liblo as an osc interface in your code:
i have successfully passed messages between max and a separate application, using osc and liblo.
Dec 7, 2007 at 3:12pm
Great! thanks very much guys.
You must be logged in to reply to this topic.