Broadcasting

View: New views
7 Messages — Rating Filter:   Alert me  

Broadcasting

by surgesg :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all,

I'm trying to implement an SC version of some networking software I've been working on. The existing project uses PD, and we broadcast all of the OSC messages using the ip 255.255.255.255. I'm trying to implement the same functionality in SC, but am having trouble.

I try:

m = NetAddr("255.255.255.255", 9999);

m.sendMsg("/test", 56);

and PD, which is listening to port 9999 with the dumpOSC object, never receives the message. Does anyone have experience with broadcasting to a local subnet using supercollider?

Also, if you're interested, here's a link to the project. So far we have PD and Processing implementations, with this SC code soon to follow.


Thanks much,


Re: Broadcasting

by fluteguy9283 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Greg,
Try using this instead:

n = NetAddr.fromIP(255255255255, 9999);                           //you'll see "a NetAddr(127.255.255.255, 9999)" in the post window
n.sendMsg("/test", 56);

Your dumpOSC in PD should then see it. Hope that helps.

-Cole


On Tue, Jul 15, 2008 at 8:22 AM, Greg Surges <surgesg@...> wrote:
Hi all,

I'm trying to implement an SC version of some networking software I've been working on. The existing project uses PD, and we broadcast all of the OSC messages using the ip 255.255.255.255. I'm trying to implement the same functionality in SC, but am having trouble.

I try:

m = NetAddr("255.255.255.255", 9999);

m.sendMsg("/test", 56);

and PD, which is listening to port 9999 with the dumpOSC object, never receives the message. Does anyone have experience with broadcasting to a local subnet using supercollider?

Also, if you're interested, here's a link to the project. So far we have PD and Processing implementations, with this SC code soon to follow.


Thanks much,




--
http://www.freewebs.com/coledingraham/

Re: Broadcasting

by surgesg :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Cole,

Thanks, but that doesn't seem to work either... The NetAddr.fromIP(255255255255,9999) call does
return the right value, but the messages don't make it to PD. I've also tried playing with

NetAddr.broadcast(9999) and NetAddr.broadcastIP(9999) with no luck. I know the Pd patch works because
sending messages to the localhost causes them to go through.

Do you have any further ideas about this?

Thanks again,

- Greg

On Tue, Jul 15, 2008 at 11:09 AM, Cole Ingraham <coledingraham@...> wrote:
Hi Greg,
Try using this instead:

n = NetAddr.fromIP(255255255255, 9999);                           //you'll see "a NetAddr(127.255.255.255, 9999)" in the post window
n.sendMsg("/test", 56);

Your dumpOSC in PD should then see it. Hope that helps.

-Cole



On Tue, Jul 15, 2008 at 8:22 AM, Greg Surges <surgesg@...> wrote:
Hi all,

I'm trying to implement an SC version of some networking software I've been working on. The existing project uses PD, and we broadcast all of the OSC messages using the ip 255.255.255.255. I'm trying to implement the same functionality in SC, but am having trouble.

I try:

m = NetAddr("255.255.255.255", 9999);

m.sendMsg("/test", 56);

and PD, which is listening to port 9999 with the dumpOSC object, never receives the message. Does anyone have experience with broadcasting to a local subnet using supercollider?

Also, if you're interested, here's a link to the project. So far we have PD and Processing implementations, with this SC code soon to follow.


Thanks much,




--
http://www.freewebs.com/coledingraham/



--
http://www.uwm.edu/~gssurges/

Re: Broadcasting

by fluteguy9283 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

It worked fine on my machine but I was running SC and PD on the same computer. I'll try a couple more things and let you know if anything else works. In the mean time have you looked at oscgroups? It's designed to broadcast OSC messages over networks.

-Cole

On Tue, Jul 15, 2008 at 2:52 PM, Greg Surges <surgesg@...> wrote:
Hi Cole,

Thanks, but that doesn't seem to work either... The NetAddr.fromIP(255255255255,9999) call does
return the right value, but the messages don't make it to PD. I've also tried playing with

NetAddr.broadcast(9999) and NetAddr.broadcastIP(9999) with no luck. I know the Pd patch works because
sending messages to the localhost causes them to go through.

Do you have any further ideas about this?

Thanks again,

- Greg


On Tue, Jul 15, 2008 at 11:09 AM, Cole Ingraham <coledingraham@...> wrote:
Hi Greg,
Try using this instead:

n = NetAddr.fromIP(255255255255, 9999);                           //you'll see "a NetAddr(127.255.255.255, 9999)" in the post window
n.sendMsg("/test", 56);

Your dumpOSC in PD should then see it. Hope that helps.

-Cole



On Tue, Jul 15, 2008 at 8:22 AM, Greg Surges <surgesg@...> wrote:
Hi all,

I'm trying to implement an SC version of some networking software I've been working on. The existing project uses PD, and we broadcast all of the OSC messages using the ip 255.255.255.255. I'm trying to implement the same functionality in SC, but am having trouble.

I try:

m = NetAddr("255.255.255.255", 9999);

m.sendMsg("/test", 56);

and PD, which is listening to port 9999 with the dumpOSC object, never receives the message. Does anyone have experience with broadcasting to a local subnet using supercollider?

Also, if you're interested, here's a link to the project. So far we have PD and Processing implementations, with this SC code soon to follow.


Thanks much,




--
http://www.freewebs.com/coledingraham/



--
http://www.uwm.edu/~gssurges/



--
http://www.freewebs.com/coledingraham/

Re: Broadcasting

by fluteguy9283 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Try this out too:

t = Server.new('test',NetAddr("255.255.255.255",9999));        //a new server for PD networking
t.addr;        //just to check the address of the new server
n.sendMsg('/test',1);        //should show up in PD

I also got messages of "/status" every second on PD because the new server is not booted.

-Cole

On Tue, Jul 15, 2008 at 4:53 PM, Cole Ingraham <coledingraham@...> wrote:
It worked fine on my machine but I was running SC and PD on the same computer. I'll try a couple more things and let you know if anything else works. In the mean time have you looked at oscgroups? It's designed to broadcast OSC messages over networks.

-Cole


On Tue, Jul 15, 2008 at 2:52 PM, Greg Surges <surgesg@...> wrote:
Hi Cole,

Thanks, but that doesn't seem to work either... The NetAddr.fromIP(255255255255,9999) call does
return the right value, but the messages don't make it to PD. I've also tried playing with

NetAddr.broadcast(9999) and NetAddr.broadcastIP(9999) with no luck. I know the Pd patch works because
sending messages to the localhost causes them to go through.

Do you have any further ideas about this?

Thanks again,

- Greg


On Tue, Jul 15, 2008 at 11:09 AM, Cole Ingraham <coledingraham@...> wrote:
Hi Greg,
Try using this instead:

n = NetAddr.fromIP(255255255255, 9999);                           //you'll see "a NetAddr(127.255.255.255, 9999)" in the post window
n.sendMsg("/test", 56);

Your dumpOSC in PD should then see it. Hope that helps.

-Cole



On Tue, Jul 15, 2008 at 8:22 AM, Greg Surges <surgesg@...> wrote:
Hi all,

I'm trying to implement an SC version of some networking software I've been working on. The existing project uses PD, and we broadcast all of the OSC messages using the ip 255.255.255.255. I'm trying to implement the same functionality in SC, but am having trouble.

I try:

m = NetAddr("255.255.255.255", 9999);

m.sendMsg("/test", 56);

and PD, which is listening to port 9999 with the dumpOSC object, never receives the message. Does anyone have experience with broadcasting to a local subnet using supercollider?

Also, if you're interested, here's a link to the project. So far we have PD and Processing implementations, with this SC code soon to follow.


Thanks much,




--
http://www.freewebs.com/coledingraham/



--
http://www.uwm.edu/~gssurges/



--
http://www.freewebs.com/coledingraham/



--
http://www.freewebs.com/coledingraham/

Re: Broadcasting

by Luke Selden :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I had to set
NetAddr.broadcastFlag_(true);

to get NetAddr.broadcast to work.  My debugging protocol when I dealt with multiple laptops on a subnet was to have one laptop send this "help!" message:
all = NetAddr.broadcast;
all.sendMsg('/roosevelt_help');

OSCresponder(nil, '/roosevelt_on', {|t,r,msg|
        var ip, name;
        if(verbose) { msg.postln };
               
        ip = msg[1].asString;
        name = msg[2].asSymbol;
        "response! name: %, ip: %\n".postf(name, ip);
}).add;


and then the others waited a second and responded with this method:
    OSCresponder(nil, '/roosevelt_help', {|t,r,msg|
          { this.broadcast }.defer(1);

    }).add

    broadcast {
        var ip = NetAddr.myIP;
        NetAddr.broadcastFlag_(true);
        Pipe.do("whoami", {|name|
            "broadcasting %, %\n".postf(ip, name);
            NetAddr.broadcast.sendMsg('/roosevelt_on', ip, name);
        } );       
    }

I would be curious to know if you've tried sending to another instance of supercollider or used a packet sniffer to see if problem is in the transmitting or receiving stages of the process...

Hope that helps-
~luke


On Tue, Jul 15, 2008 at 2:52 PM, Greg Surges <surgesg@...> wrote:
Hi Cole,

Thanks, but that doesn't seem to work either... The NetAddr.fromIP(255255255255,9999) call does
return the right value, but the messages don't make it to PD. I've also tried playing with

NetAddr.broadcast(9999) and NetAddr.broadcastIP(9999) with no luck. I know the Pd patch works because
sending messages to the localhost causes them to go through.

Do you have any further ideas about this?

Thanks again,

- Greg




On Tue, Jul 15, 2008 at 8:22 AM, Greg Surges <surgesg@...> wrote:
Hi all,

I'm trying to implement an SC version of some networking software I've been working on. The existing project uses PD, and we broadcast all of the OSC messages using the ip 255.255.255.255. I'm trying to implement the same functionality in SC, but am having trouble.

I try:

m = NetAddr("255.255.255.255", 9999);

m.sendMsg("/test", 56);

and PD, which is listening to port 9999 with the dumpOSC object, never receives the message. Does anyone have experience with broadcasting to a local subnet using supercollider?

Also, if you're interested, here's a link to the project. So far we have PD and Processing implementations, with this SC code soon to follow.


Thanks much,




--
http://www.freewebs.com/coledingraham/



--
http://www.uwm.edu/~gssurges/


Re: Broadcasting

by surgesg :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Okay, thanks so much guys.

Doing:

NetAddr.broadcastFlag_(true);
NetAddr.broadcast(9999).sendMsg("/test", value);

seems to do the trick! I really appreciate the help from you both.

I'll post when the project is completed, if people are interested.

Best,

- Greg


On Tue, Jul 15, 2008 at 7:12 PM, Luke Selden <lselden@...> wrote:
I had to set
NetAddr.broadcastFlag_(true);

to get NetAddr.broadcast to work.  My debugging protocol when I dealt with multiple laptops on a subnet was to have one laptop send this "help!" message:
all = NetAddr.broadcast;
all.sendMsg('/roosevelt_help');

OSCresponder(nil, '/roosevelt_on', {|t,r,msg|
        var ip, name;
        if(verbose) { msg.postln };
               
        ip = msg[1].asString;
        name = msg[2].asSymbol;
        "response! name: %, ip: %\n".postf(name, ip);
}).add;


and then the others waited a second and responded with this method:
    OSCresponder(nil, '/roosevelt_help', {|t,r,msg|
          { this.broadcast }.defer(1);

    }).add

    broadcast {
        var ip = NetAddr.myIP;
        NetAddr.broadcastFlag_(true);
        Pipe.do("whoami", {|name|
            "broadcasting %, %\n".postf(ip, name);
            NetAddr.broadcast.sendMsg('/roosevelt_on', ip, name);
        } );       
    }

I would be curious to know if you've tried sending to another instance of supercollider or used a packet sniffer to see if problem is in the transmitting or receiving stages of the process...

Hope that helps-
~luke


On Tue, Jul 15, 2008 at 2:52 PM, Greg Surges <surgesg@...> wrote:
Hi Cole,

Thanks, but that doesn't seem to work either... The NetAddr.fromIP(255255255255,9999) call does
return the right value, but the messages don't make it to PD. I've also tried playing with

NetAddr.broadcast(9999) and NetAddr.broadcastIP(9999) with no luck. I know the Pd patch works because
sending messages to the localhost causes them to go through.

Do you have any further ideas about this?

Thanks again,

- Greg




On Tue, Jul 15, 2008 at 8:22 AM, Greg Surges <surgesg@...> wrote:
Hi all,

I'm trying to implement an SC version of some networking software I've been working on. The existing project uses PD, and we broadcast all of the OSC messages using the ip 255.255.255.255. I'm trying to implement the same functionality in SC, but am having trouble.

I try:

m = NetAddr("255.255.255.255", 9999);

m.sendMsg("/test", 56);

and PD, which is listening to port 9999 with the dumpOSC object, never receives the message. Does anyone have experience with broadcasting to a local subnet using supercollider?

Also, if you're interested, here's a link to the project. So far we have PD and Processing implementations, with this SC code soon to follow.


Thanks much,








--
http://www.uwm.edu/~gssurges/
LightInTheBox - Buy quality products at wholesale price