NetAddr

View: New views
20 Messages — Rating Filter:   Alert me  
< Prev | 1 - 2 - 3 | Next >

NetAddr

by William Brent-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I'm using Pd/Gem to do some motion tracking - sending particular OSC messages to SuperCollider when certain areas of the video have motion.  The only way I'm getting successful communication is to have the addr argument of OSCresponder set to nil.  When I specify a NetAddr for the video tracking computer in the standard way described in the helpfile, communication fails:

n = NetAddr("192.168.1.66", 57120);

o = OSCresponder(n, '/movement/1', { |t, r, msg| msg[1].postln }).add;

On the Pd side, things are the same either way: I make a connection to the SC machine's address, and start sending messages.  So the only difference between communication vs. failure is whether or not the OSCresponder acknowledges messages from anywhere, or only from a specific address.  I guess this is just as much a question for people on the Pd list, since it might be the way messages are coming out of Pd.

But maybe someone has already been down this path?  It would be nice to limit the awareness of this OSCr to one address.


As usual, thanks...
William


-- 
William Brent

"Great minds flock together"
Conflations: conversational idiom for the 21st century

www.conflations.com
_______________________________________________
sc-users mailing list
sc-users@...
http://lists.create.ucsb.edu/mailman/listinfo/sc-users

Re: NetAddr

by nescivi :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi William,

On Monday 03 March 2008 16:42:34 William Brent wrote:

> I'm using Pd/Gem to do some motion tracking - sending particular OSC
> messages to SuperCollider when certain areas of the video have motion.  The
> only way I'm getting successful communication is to have the addr argument
> of OSCresponder set to nil.  When I specify a NetAddr for the video
> tracking computer in the standard way described in the helpfile,
> communication fails:
>
> n = NetAddr("192.168.1.66", 57120);
>
> o = OSCresponder(n, '/movement/1', { |t, r, msg| msg[1].postln }).add;
>
> On the Pd side, things are the same either way: I make a connection to the
> SC machine's address, and start sending messages.  So the only difference
> between communication vs. failure is whether or not the OSCresponder
> acknowledges messages from anywhere, or only from a specific address.  I
> guess this is just as much a question for people on the Pd list, since it
> might be the way messages are coming out of Pd.
>
> But maybe someone has already been down this path?  It would be nice to
> limit the awareness of this OSCr to one address.

this is really a question for Pd. You need to know from which address and port
Pd is sending the message.
Once you know that, you can create a NetAddr with that info and limit to
listening only from that NetAddr.

sincerely,
Marije
_______________________________________________
sc-users mailing list
sc-users@...
http://lists.create.ucsb.edu/mailman/listinfo/sc-users

NetAddr

by Oswald Berthold-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


hi

the problem is that pd is most likely not sending from 57120. the
sendOSC object would need a method for setting its outgoing
portnumber.

to check, you can do a netstat on the sending machine, determine the
port used and put that into your NetAddr manually.

bst, opt


William Brent writes:
 > Hi,
 >
 > I'm using Pd/Gem to do some motion tracking - sending particular OSC
 > messages to SuperCollider when certain areas of the video have motion.  The
 > only way I'm getting successful communication is to have the addr argument
 > of OSCresponder set to nil.  When I specify a NetAddr for the video tracking
 > computer in the standard way described in the helpfile, communication fails:
 >
 > n = NetAddr("192.168.1.66", 57120);
 >
 > o = OSCresponder(n, '/movement/1', { |t, r, msg| msg[1].postln }).add;
 >
 > On the Pd side, things are the same either way: I make a connection to the
 > SC machine's address, and start sending messages.  So the only difference
 > between communication vs. failure is whether or not the OSCresponder
 > acknowledges messages from anywhere, or only from a specific address.  I
 > guess this is just as much a question for people on the Pd list, since it
 > might be the way messages are coming out of Pd.
 >
 > But maybe someone has already been down this path?  It would be nice to
 > limit the awareness of this OSCr to one address.
 >
 >
 > As usual, thanks...
 > William
 >
 >
 > --
 > William Brent
 >
 > "Great minds flock together"
 > Conflations: conversational idiom for the 21st century
 >
 > www.conflations.com
 > _______________________________________________
 > sc-users mailing list
 > sc-users@...
 > http://lists.create.ucsb.edu/mailman/listinfo/sc-users
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>

iD8DBQFHzHSu7u+hhWCy2kMRAncQAKCSqvH81ecbUu5P12uCzp8yfXxgKQCgqxV7
Pb7qM1K1gYwRecX1sQK9VtY=
=pNsD
-----END PGP SIGNATURE-----
_______________________________________________
sc-users mailing list
sc-users@...
http://lists.create.ucsb.edu/mailman/listinfo/sc-users

Re: NetAddr

by William Brent-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks, all.  I'll post to the Pd list as well.  For the record though, the sendOSC object does require a port number, and I've got it set to 57120.  If I figure out what's up, I'll post back here for future reference...


William



On Mon, Mar 3, 2008 at 1:59 PM, Oswald Berthold <opt@...> wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


hi

the problem is that pd is most likely not sending from 57120. the
sendOSC object would need a method for setting its outgoing
portnumber.

to check, you can do a netstat on the sending machine, determine the
port used and put that into your NetAddr manually.

bst, opt


William Brent writes:
 > Hi,
 >
 > I'm using Pd/Gem to do some motion tracking - sending particular OSC
 > messages to SuperCollider when certain areas of the video have motion.  The
 > only way I'm getting successful communication is to have the addr argument
 > of OSCresponder set to nil.  When I specify a NetAddr for the video tracking
 > computer in the standard way described in the helpfile, communication fails:
 >
 > n = NetAddr("192.168.1.66", 57120);
 >
 > o = OSCresponder(n, '/movement/1', { |t, r, msg| msg[1].postln }).add;
 >
 > On the Pd side, things are the same either way: I make a connection to the
 > SC machine's address, and start sending messages.  So the only difference
 > between communication vs. failure is whether or not the OSCresponder
 > acknowledges messages from anywhere, or only from a specific address.  I
 > guess this is just as much a question for people on the Pd list, since it
 > might be the way messages are coming out of Pd.
 >
 > But maybe someone has already been down this path?  It would be nice to
 > limit the awareness of this OSCr to one address.
 >
 >
 > As usual, thanks...
 > William
 >
 >
 > --
 > William Brent
 >
 > "Great minds flock together"
 > Conflations: conversational idiom for the 21st century
 >
 > www.conflations.com
 > _______________________________________________
 > sc-users mailing list
 > sc-users@...
 > http://lists.create.ucsb.edu/mailman/listinfo/sc-users
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>

iD8DBQFHzHSu7u+hhWCy2kMRAncQAKCSqvH81ecbUu5P12uCzp8yfXxgKQCgqxV7
Pb7qM1K1gYwRecX1sQK9VtY=
=pNsD
-----END PGP SIGNATURE-----
_______________________________________________
sc-users mailing list
sc-users@...
http://lists.create.ucsb.edu/mailman/listinfo/sc-users



--
William Brent

"Great minds flock together"
Conflations: conversational idiom for the 21st century

www.conflations.com
_______________________________________________
sc-users mailing list
sc-users@...
http://lists.create.ucsb.edu/mailman/listinfo/sc-users

Re: NetAddr

by nescivi :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hiho,

On Monday 03 March 2008 19:15:26 William Brent wrote:
> Thanks, all.  I'll post to the Pd list as well.  For the record though, the
> sendOSC object does require a port number, and I've got it set to 57120.

yes, that's probably the port it is sending *to*, which is correct, if you
want to receive the messages in sclang.

What you need to know is the port Pd is sending *from*.

sincerely,
Marije

> If I figure out what's up, I'll post back here for future reference...
>
>
> William
>
> On Mon, Mar 3, 2008 at 1:59 PM, Oswald Berthold <opt@...> wrote:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> >
> > hi
> >
> > the problem is that pd is most likely not sending from 57120. the
> > sendOSC object would need a method for setting its outgoing
> > portnumber.
> >
> > to check, you can do a netstat on the sending machine, determine the
> > port used and put that into your NetAddr manually.
> >
> > bst, opt
> >
> > William Brent writes:
> >  > Hi,
> >  >
> >  > I'm using Pd/Gem to do some motion tracking - sending particular OSC
> >  > messages to SuperCollider when certain areas of the video have motion.
> >
> >  The
> >
> >  > only way I'm getting successful communication is to have the addr
> >
> > argument
> >
> >  > of OSCresponder set to nil.  When I specify a NetAddr for the video
> >
> > tracking
> >
> >  > computer in the standard way described in the helpfile, communication
> >
> > fails:
> >  > n = NetAddr("192.168.1.66", 57120);
> >  >
> >  > o = OSCresponder(n, '/movement/1', { |t, r, msg| msg[1].postln }).add;
> >  >
> >  > On the Pd side, things are the same either way: I make a connection to
> >
> > the
> >
> >  > SC machine's address, and start sending messages.  So the only
> >
> > difference
> >
> >  > between communication vs. failure is whether or not the OSCresponder
> >  > acknowledges messages from anywhere, or only from a specific address.
> >
> >  I
> >
> >  > guess this is just as much a question for people on the Pd list, since
> >
> > it
> >
> >  > might be the way messages are coming out of Pd.
> >  >
> >  > But maybe someone has already been down this path?  It would be nice
> >  > to limit the awareness of this OSCr to one address.
> >  >
> >  >
> >  > As usual, thanks...
> >  > William
> >  >
> >  >
> >  > --
> >  > William Brent
> >  >
> >  > "Great minds flock together"
> >  > Conflations: conversational idiom for the 21st century
> >  >
> >  > www.conflations.com
> >  > _______________________________________________
> >  > sc-users mailing list
> >  > sc-users@...
> >  > http://lists.create.ucsb.edu/mailman/listinfo/sc-users
> >
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG v1.4.7 (GNU/Linux)
> > Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>
> >
> > iD8DBQFHzHSu7u+hhWCy2kMRAncQAKCSqvH81ecbUu5P12uCzp8yfXxgKQCgqxV7
> > Pb7qM1K1gYwRecX1sQK9VtY=
> > =pNsD
> > -----END PGP SIGNATURE-----
> > _______________________________________________
> > sc-users mailing list
> > sc-users@...
> > http://lists.create.ucsb.edu/mailman/listinfo/sc-users


_______________________________________________
sc-users mailing list
sc-users@...
http://lists.create.ucsb.edu/mailman/listinfo/sc-users

Re: NetAddr

by William Brent-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hmm.  I've been doing a little more testing on this, using two separate machines.  Here's what seems to be true:

1) With both machines using SC, OSC messaging is fine through port 57120.  Each side simply specifies

n = NetAddr("address of other machine", 57120);
o = OSCresponder(n, '/chat', { |t, r, msg| msg.postln }).add;

n.sendMsg("/chat", "blah");

This means each machine is listening for messages *from* the address of the other machine, on port 57120, and sending messages *to* the other addresss on port 57120.

So within SC, of course, all is well.


2) OSC communication between Max and Max, Pd and Pd, or Pd and Max is all fine.

3) Using either the sendOSC object in Pd, or the udpsend object in Max/MSP, communication with SC fails unless SC's OSCresponder addr argument is set to nil.  This is in spite of the fact that sendOSC and udpsend require you to specify the address and port number you'd like to send *to*.  There is no way to specify what port you're sending *from* on the Pd or Max machines, but I've been told that if you're sending to a specific port on another machine, the local machine must necessarily be sending out the same port.  I have no idea if that's true or not...

So, in a way, there's no problem, as long as you explicitly specify no NetAddr to listen for.  A friend of mine did a piece by Paul Lansky that required SC/Max communication, and that code also has OSCresponders listening to a "nil" NetAddr, since it was the only way to make it happen.

I don't know enough about this to suggest what's going on.  Maybe I'm still missing something (and sorry if I am!), but it seems like there could be a problem on the SC side here...


William


On Mon, Mar 3, 2008 at 4:19 PM, nescivi <nescivi@...> wrote:
Hiho,

On Monday 03 March 2008 19:15:26 William Brent wrote:
> Thanks, all.  I'll post to the Pd list as well.  For the record though, the
> sendOSC object does require a port number, and I've got it set to 57120.

yes, that's probably the port it is sending *to*, which is correct, if you
want to receive the messages in sclang.

What you need to know is the port Pd is sending *from*.

sincerely,
Marije

> If I figure out what's up, I'll post back here for future reference...
>
>
> William
>
> On Mon, Mar 3, 2008 at 1:59 PM, Oswald Berthold <opt@...> wrote:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> >
> > hi
> >
> > the problem is that pd is most likely not sending from 57120. the
> > sendOSC object would need a method for setting its outgoing
> > portnumber.
> >
> > to check, you can do a netstat on the sending machine, determine the
> > port used and put that into your NetAddr manually.
> >
> > bst, opt
> >
> > William Brent writes:
> >  > Hi,
> >  >
> >  > I'm using Pd/Gem to do some motion tracking - sending particular OSC
> >  > messages to SuperCollider when certain areas of the video have motion.
> >
> >  The
> >
> >  > only way I'm getting successful communication is to have the addr
> >
> > argument
> >
> >  > of OSCresponder set to nil.  When I specify a NetAddr for the video
> >
> > tracking
> >
> >  > computer in the standard way described in the helpfile, communication
> >
> > fails:
> >  > n = NetAddr("192.168.1.66", 57120);
> >  >
> >  > o = OSCresponder(n, '/movement/1', { |t, r, msg| msg[1].postln }).add;
> >  >
> >  > On the Pd side, things are the same either way: I make a connection to
> >
> > the
> >
> >  > SC machine's address, and start sending messages.  So the only
> >
> > difference
> >
> >  > between communication vs. failure is whether or not the OSCresponder
> >  > acknowledges messages from anywhere, or only from a specific address.
> >
> >  I
> >
> >  > guess this is just as much a question for people on the Pd list, since
> >
> > it
> >
> >  > might be the way messages are coming out of Pd.
> >  >
> >  > But maybe someone has already been down this path?  It would be nice
> >  > to limit the awareness of this OSCr to one address.
> >  >
> >  >
> >  > As usual, thanks...
> >  > William
> >  >
> >  >
> >  > --
> >  > William Brent
> >  >
> >  > "Great minds flock together"
> >  > Conflations: conversational idiom for the 21st century
> >  >
> >  > www.conflations.com
> >  > _______________________________________________
> >  > sc-users mailing list
> >  > sc-users@...
> >  > http://lists.create.ucsb.edu/mailman/listinfo/sc-users
> >
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG v1.4.7 (GNU/Linux)
> > Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>
> >
> > iD8DBQFHzHSu7u+hhWCy2kMRAncQAKCSqvH81ecbUu5P12uCzp8yfXxgKQCgqxV7
> > Pb7qM1K1gYwRecX1sQK9VtY=
> > =pNsD
> > -----END PGP SIGNATURE-----
> > _______________________________________________
> > sc-users mailing list
> > sc-users@...
> > http://lists.create.ucsb.edu/mailman/listinfo/sc-users


_______________________________________________
sc-users mailing list
sc-users@...
http://lists.create.ucsb.edu/mailman/listinfo/sc-users



--
William Brent

"Great minds flock together"
Conflations: conversational idiom for the 21st century

www.conflations.com
_______________________________________________
sc-users mailing list
sc-users@...
http://lists.create.ucsb.edu/mailman/listinfo/sc-users

Re: NetAddr

by nescivi :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hiho,

On Tuesday 04 March 2008 21:28:27 William Brent wrote:

> Hmm.  I've been doing a little more testing on this, using two separate
> machines.  Here's what seems to be true:
>
> 1) With both machines using SC, OSC messaging is fine through port 57120.
> Each side simply specifies
>
> n = NetAddr("address of other machine", 57120);
> o = OSCresponder(n, '/chat', { |t, r, msg| msg.postln }).add;
>
> n.sendMsg("/chat", "blah");
>
> This means each machine is listening for messages *from* the address of the
> other machine, on port 57120, and sending messages *to* the other addresss
> on port 57120.
>
> So within SC, of course, all is well.

correct, since SC sends from the same port as that it listens to, which is as
it should be.
In OSC world it is custom to send reply messages, so from the received message
you are able to figure out from which ip and port is was sent, so you can
back a message.


> 2) OSC communication between Max and Max, Pd and Pd, or Pd and Max is all
> fine.
>
> 3) Using either the sendOSC object in Pd, or the udpsend object in Max/MSP,
> communication with SC fails unless SC's OSCresponder addr argument is set
> to nil.  This is in spite of the fact that sendOSC and udpsend require you
> to specify the address and port number you'd like to send *to*.

Again, there is a difference between the address they are sending from and
sending to. Like putting your address on a letter you send by snail mail. It
gives the receiver a method to figure out where the letter came from, and
enables him to send a letter back.



> There is
> no way to specify what port you're sending *from* on the Pd or Max
> machines, but I've been told that if you're sending to a specific port on
> another machine, the local machine must necessarily be sending out the same
> port.  I have no idea if that's true or not...

no.
The fact that there is no way to specify *from* which Pd or Max are sending is
a weakness on their side. They should either let you specify it, or document
which port they are using. But chances are that they just take any port, in
which case you have no other option than to use nil in the OSCresponder.

But maybe Max and Pd are consistent in their behaviour.

I am not entirely sure whether this will work, for lack of Pd on my system,
but possibly with this bit of code, you van figure out from which address Pd
is sending.

o = OSCresponder(nil, '/chat', { |t, r, msg, addr| addr.postln; }).add;

I think it should post the addr. that the message comes from; please test this
by banging your sendOSC object multiple times to see if it is consistent.

> So, in a way, there's no problem, as long as you explicitly specify no
> NetAddr to listen for.  A friend of mine did a piece by Paul Lansky that
> required SC/Max communication, and that code also has OSCresponders
> listening to a "nil" NetAddr, since it was the only way to make it happen.
>
> I don't know enough about this to suggest what's going on.  Maybe I'm still
> missing something (and sorry if I am!), but it seems like there could be a
> problem on the SC side here...

nope, the problem is on the other side.
SC allows for a safe mechanism by only listening to one specific port. It is
up to the sending application to provide an equally safe mechanism to send
messages out.

sincerely,
Marije
_______________________________________________
sc-users mailing list
sc-users@...
http://lists.create.ucsb.edu/mailman/listinfo/sc-users

Re: NetAddr

by William Brent-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> o = OSCresponder(nil, '/chat', { |t, r, msg, addr| addr.postln; }).add;

Bingo.  That gave the port.  I had tried to check with netstat as you suggested before, but this port never came up.  Pd doesn't use a consistent port number.  But now I know how to find it.

Thanks for your patience on this.  I'll post to the Pd list and let them know about it.


William


On Tue, Mar 4, 2008 at 6:48 PM, nescivi <nescivi@...> wrote:
Hiho,

On Tuesday 04 March 2008 21:28:27 William Brent wrote:
> Hmm.  I've been doing a little more testing on this, using two separate
> machines.  Here's what seems to be true:
>
> 1) With both machines using SC, OSC messaging is fine through port 57120.
> Each side simply specifies
>
> n = NetAddr("address of other machine", 57120);
> o = OSCresponder(n, '/chat', { |t, r, msg| msg.postln }).add;
>
> n.sendMsg("/chat", "blah");
>
> This means each machine is listening for messages *from* the address of the
> other machine, on port 57120, and sending messages *to* the other addresss
> on port 57120.
>
> So within SC, of course, all is well.

correct, since SC sends from the same port as that it listens to, which is as
it should be.
In OSC world it is custom to send reply messages, so from the received message
you are able to figure out from which ip and port is was sent, so you can
back a message.


> 2) OSC communication between Max and Max, Pd and Pd, or Pd and Max is all
> fine.
>
> 3) Using either the sendOSC object in Pd, or the udpsend object in Max/MSP,
> communication with SC fails unless SC's OSCresponder addr argument is set
> to nil.  This is in spite of the fact that sendOSC and udpsend require you
> to specify the address and port number you'd like to send *to*.

Again, there is a difference between the address they are sending from and
sending to. Like putting your address on a letter you send by snail mail. It
gives the receiver a method to figure out where the letter came from, and
enables him to send a letter back.



> There is
> no way to specify what port you're sending *from* on the Pd or Max
> machines, but I've been told that if you're sending to a specific port on
> another machine, the local machine must necessarily be sending out the same
> port.  I have no idea if that's true or not...

no.
The fact that there is no way to specify *from* which Pd or Max are sending is
a weakness on their side. They should either let you specify it, or document
which port they are using. But chances are that they just take any port, in
which case you have no other option than to use nil in the OSCresponder.

But maybe Max and Pd are consistent in their behaviour.

I am not entirely sure whether this will work, for lack of Pd on my system,
but possibly with this bit of code, you van figure out from which address Pd
is sending.

o = OSCresponder(nil, '/chat', { |t, r, msg, addr| addr.postln; }).add;

I think it should post the addr. that the message comes from; please test this
by banging your sendOSC object multiple times to see if it is consistent.

> So, in a way, there's no problem, as long as you explicitly specify no
> NetAddr to listen for.  A friend of mine did a piece by Paul Lansky that
> required SC/Max communication, and that code also has OSCresponders
> listening to a "nil" NetAddr, since it was the only way to make it happen.
>
> I don't know enough about this to suggest what's going on.  Maybe I'm still
> missing something (and sorry if I am!), but it seems like there could be a
> problem on the SC side here...

nope, the problem is on the other side.
SC allows for a safe mechanism by only listening to one specific port. It is
up to the sending application to provide an equally safe mechanism to send
messages out.

sincerely,
Marije
_______________________________________________
sc-users mailing list
sc-users@...
http://lists.create.ucsb.edu/mailman/listinfo/sc-users



--
William Brent

"Great minds flock together"
Conflations: conversational idiom for the 21st century

www.conflations.com
_______________________________________________
sc-users mailing list
sc-users@...
http://lists.create.ucsb.edu/mailman/listinfo/sc-users

Re: NetAddr

by Till Bovermann :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 05.03.2008, at 03:58, William Brent wrote:

> > o = OSCresponder(nil, '/chat', { |t, r, msg, addr|  
> addr.postln; }).add;
>
> Bingo.  That gave the port.  I had tried to check with netstat as  
> you suggested before, but this port never came up.  Pd doesn't use a  
> consistent port number.  But now I know how to find it.
>
> Thanks for your patience on this.  I'll post to the Pd list and let  
> them know about it.

AFAIK it is because the standard example of provided by the osc guys  
(sendOSC) don't care about the outgoing port. the pd sender simply  
uses this slightly adapted code.

regards
Till

_______________________________________________
sc-users mailing list
sc-users@...
http://lists.create.ucsb.edu/mailman/listinfo/sc-users

Re: NetAddr

by nonprivate :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

hi, sorry to ask this again,
but is it the case that sc can only listen to 57120, and does not
respond to anything else? it seems like it to me, after recent
experiments. if that isn't the case then i need to find out where i'm
going wrong with this stuff.
thanks.

Dipl.-Inf. Till Bovermann wrote:

> On 05.03.2008, at 03:58, William Brent wrote:
>
>  
>>> o = OSCresponder(nil, '/chat', { |t, r, msg, addr|  
>>>      
>> addr.postln; }).add;
>>
>> Bingo.  That gave the port.  I had tried to check with netstat as  
>> you suggested before, but this port never came up.  Pd doesn't use a  
>> consistent port number.  But now I know how to find it.
>>
>> Thanks for your patience on this.  I'll post to the Pd list and let  
>> them know about it.
>>    
>
> AFAIK it is because the standard example of provided by the osc guys  
> (sendOSC) don't care about the outgoing port. the pd sender simply  
> uses this slightly adapted code.
>
> regards
> Till
>
> _______________________________________________
> sc-users mailing list
> sc-users@...
> http://lists.create.ucsb.edu/mailman/listinfo/sc-users
>
>  

_______________________________________________
sc-users mailing list
sc-users@...
http://lists.create.ucsb.edu/mailman/listinfo/sc-users

Re: NetAddr

by LFSaw :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

the language _listens_ only on port 57120 ( NetAddr.localAddr ).

hope that helps.

Till

On 05.03.2008, at 13:26, nonprivate wrote:

> hi, sorry to ask this again,
> but is it the case that sc can only listen to 57120, and does not
> respond to anything else? it seems like it to me, after recent
> experiments. if that isn't the case then i need to find out where i'm
> going wrong with this stuff.
> thanks.
>
> Dipl.-Inf. Till Bovermann wrote:
>> On 05.03.2008, at 03:58, William Brent wrote:
>>
>>
>>>> o = OSCresponder(nil, '/chat', { |t, r, msg, addr|
>>>>
>>> addr.postln; }).add;
>>>
>>> Bingo.  That gave the port.  I had tried to check with netstat as
>>> you suggested before, but this port never came up.  Pd doesn't use a
>>> consistent port number.  But now I know how to find it.
>>>
>>> Thanks for your patience on this.  I'll post to the Pd list and let
>>> them know about it.
>>>
>>
>> AFAIK it is because the standard example of provided by the osc guys
>> (sendOSC) don't care about the outgoing port. the pd sender simply
>> uses this slightly adapted code.
>>
>> regards
>> Till
>>
>> _______________________________________________
>> sc-users mailing list
>> sc-users@...
>> http://lists.create.ucsb.edu/mailman/listinfo/sc-users
>>
>>
>
> _______________________________________________
> sc-users mailing list
> sc-users@...
> http://lists.create.ucsb.edu/mailman/listinfo/sc-users

_______________________________________________
sc-users mailing list
sc-users@...
http://lists.create.ucsb.edu/mailman/listinfo/sc-users

Re: NetAddr

by nonprivate :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

thanks till, it does help to know that!
in that case, it doesn't really make sense to specify a port for
OSCresponder to listen to, does it (?)

also, i suppose this goes to the developers, why can't we change the
port which the language listens to, or be able to listen to multiple
ports at once? and why can't we listen for any message that might be
coming in, instead of only a particular string (and ignoring the rest)

sorry for the question barrage, i'm really interested in this stuff.

it does seem odd that sc is so inflexible in this area, when it is
founded on open sound control. i suppose i could always make a max/msp
patch that can listen to everything and anything, and then filter stuff,
right?!

LFSaw wrote:

> the language _listens_ only on port 57120 ( NetAddr.localAddr ).
>
> hope that helps.
>
> Till
>
> On 05.03.2008, at 13:26, nonprivate wrote:
>
>  
>> hi, sorry to ask this again,
>> but is it the case that sc can only listen to 57120, and does not
>> respond to anything else? it seems like it to me, after recent
>> experiments. if that isn't the case then i need to find out where i'm
>> going wrong with this stuff.
>> thanks.
>>
>> Dipl.-Inf. Till Bovermann wrote:
>>    
>>> On 05.03.2008, at 03:58, William Brent wrote:
>>>
>>>
>>>      
>>>>> o = OSCresponder(nil, '/chat', { |t, r, msg, addr|
>>>>>
>>>>>          
>>>> addr.postln; }).add;
>>>>
>>>> Bingo.  That gave the port.  I had tried to check with netstat as
>>>> you suggested before, but this port never came up.  Pd doesn't use a
>>>> consistent port number.  But now I know how to find it.
>>>>
>>>> Thanks for your patience on this.  I'll post to the Pd list and let
>>>> them know about it.
>>>>
>>>>        
>>> AFAIK it is because the standard example of provided by the osc guys
>>> (sendOSC) don't care about the outgoing port. the pd sender simply
>>> uses this slightly adapted code.
>>>
>>> regards
>>> Till
>>>
>>> _______________________________________________
>>> sc-users mailing list
>>> sc-users@...
>>> http://lists.create.ucsb.edu/mailman/listinfo/sc-users
>>>
>>>
>>>      
>> _______________________________________________
>> sc-users mailing list
>> sc-users@...
>> http://lists.create.ucsb.edu/mailman/listinfo/sc-users
>>    
>
> _______________________________________________
> sc-users mailing list
> sc-users@...
> http://lists.create.ucsb.edu/mailman/listinfo/sc-users
>
>  

_______________________________________________
sc-users mailing list
sc-users@...
http://lists.create.ucsb.edu/mailman/listinfo/sc-users

Re: NetAddr

by nescivi :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wednesday 05 March 2008 07:26:40 nonprivate wrote:
> hi, sorry to ask this again,
> but is it the case that sc can only listen to 57120, and does not
> respond to anything else? it seems like it to me, after recent
> experiments. if that isn't the case then i need to find out where i'm
> going wrong with this stuff.
> thanks.

SC listens to NetAddr.langPort.
normally this is 57120

sincerely,
Marije

> Dipl.-Inf. Till Bovermann wrote:
> > On 05.03.2008, at 03:58, William Brent wrote:
> >>> o = OSCresponder(nil, '/chat', { |t, r, msg, addr|
> >>
> >> addr.postln; }).add;
> >>
> >> Bingo.  That gave the port.  I had tried to check with netstat as
> >> you suggested before, but this port never came up.  Pd doesn't use a
> >> consistent port number.  But now I know how to find it.
> >>
> >> Thanks for your patience on this.  I'll post to the Pd list and let
> >> them know about it.
> >
> > AFAIK it is because the standard example of provided by the osc guys
> > (sendOSC) don't care about the outgoing port. the pd sender simply
> > uses this slightly adapted code.
> >
> > regards
> > Till
> >
> > _______________________________________________
> > sc-users mailing list
> > sc-users@...
> > http://lists.create.ucsb.edu/mailman/listinfo/sc-users
>
> _______________________________________________
> sc-users mailing list
> sc-users@...
> http://lists.create.ucsb.edu/mailman/listinfo/sc-users


_______________________________________________
sc-users mailing list
sc-users@...
http://lists.create.ucsb.edu/mailman/listinfo/sc-users

Re: NetAddr

by nescivi :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hiho,

On Wednesday 05 March 2008 10:51:40 nonprivate wrote:
> thanks till, it does help to know that!
> in that case, it doesn't really make sense to specify a port for
> OSCresponder to listen to, does it (?)

yes, it does.
It determines to listen for messages coming *from* a specific port.

> also, i suppose this goes to the developers, why can't we change the
> port which the language listens to, or be able to listen to multiple
> ports at once?

I think the OSC concept is that each application has one port it listens on
and sends from. That keeps it simple, I think.

> and why can't we listen for any message that might be
> coming in, instead of only a particular string (and ignoring the rest)

Did you try listening to an empty string?

The reason to filter by message ensures that you don't have to write long
responder logic to get the right reaction to the right message.

sincerely,
Marije
_______________________________________________
sc-users mailing list
sc-users@...
http://lists.create.ucsb.edu/mailman/listinfo/sc-users

Re: NetAddr

by nonprivate :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

hi marie, thanks for the reply!
i'm obviously getting confused, because i thought sc could only listen
to things coming in from 57120? which is what i thought you and till
said before.
and if i use the monome or akaRemote, and set them to send to a port
number that isn't 57120, sc doesn't get anything. max/msp picks up
everything though.


nescivi wrote:

> Hiho,
>
> On Wednesday 05 March 2008 10:51:40 nonprivate wrote:
>  
>> thanks till, it does help to know that!
>> in that case, it doesn't really make sense to specify a port for
>> OSCresponder to listen to, does it (?)
>>    
>
> yes, it does.
> It determines to listen for messages coming *from* a specific port.
>
>  

_______________________________________________
sc-users mailing list
sc-users@...
http://lists.create.ucsb.edu/mailman/listinfo/sc-users

Re: NetAddr

by Oswald Berthold-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


hi all

just a couple of remarks regarding both issues ..

william:

why don't you just _use_ nil as the NetAddr in the responder?

if your concern is security, you should really take other action, like
filtering on the OS level or a router, because, afaics, in order to
determine the value of the addr argument, sclang has accepted the
(malicious) package already.

(
from the SC side, it would make sense to have a NetAddr object with a
wildcard port number, so you'd only set the IP address but leave the
originating port unspecified. but then, wildcards at this specific
point haven't been in the design for efficiency reasons, iirc.

from the PD side, it would of course make sense, while using UDP, to
use a single and fixed UDP port for both sending and receiving but
thats kind of incompatible with dumpOSC usage.
)

---------------------------------------

the listening port issue:

using the sclang program alone, you can indeed set the port number through a
commandline argument:

   -u <network-port-number>       Set UDP listening port (default
    57120)

haha, but then i'm confident the situation is different when you're using
the OSX SuperCollider Application (as Till pointed out).

a hack can always be something like this:

"nc -u -l -p 1234 | nc -u localhost:57120".unixCmd;

this uses netcat (nc), which i assume to be installed on a standard
OSX, to listen on an arbitrary udp port and redirect all packet to the
port where sc is listening.

there are alternative ways of accomplishing this redirect, like using
firewall rules again or some alternative userland utility like nc.

bst, opt

nescivi writes:
 > On Wednesday 05 March 2008 07:26:40 nonprivate wrote:
 > > hi, sorry to ask this again,
 > > but is it the case that sc can only listen to 57120, and does not
 > > respond to anything else? it seems like it to me, after recent
 > > experiments. if that isn't the case then i need to find out where i'm
 > > going wrong with this stuff.
 > > thanks.
 >
 > SC listens to NetAddr.langPort.
 > normally this is 57120
 >
 > sincerely,
 > Marije
 >
 > > Dipl.-Inf. Till Bovermann wrote:
 > > > On 05.03.2008, at 03:58, William Brent wrote:
 > > >>> o = OSCresponder(nil, '/chat', { |t, r, msg, addr|
 > > >>
 > > >> addr.postln; }).add;
 > > >>
 > > >> Bingo.  That gave the port.  I had tried to check with netstat as
 > > >> you suggested before, but this port never came up.  Pd doesn't use a
 > > >> consistent port number.  But now I know how to find it.
 > > >>
 > > >> Thanks for your patience on this.  I'll post to the Pd list and let
 > > >> them know about it.
 > > >
 > > > AFAIK it is because the standard example of provided by the osc guys
 > > > (sendOSC) don't care about the outgoing port. the pd sender simply
 > > > uses this slightly adapted code.
 > > >
 > > > regards
 > > > Till
 > > >
 > > > _______________________________________________
 > > > sc-users mailing list
 > > > sc-users@...
 > > > http://lists.create.ucsb.edu/mailman/listinfo/sc-users
 > >
 > > _______________________________________________
 > > sc-users mailing list
 > > sc-users@...
 > > http://lists.create.ucsb.edu/mailman/listinfo/sc-users
 >
 >
 > _______________________________________________
 > sc-users mailing list
 > sc-users@...
 > http://lists.create.ucsb.edu/mailman/listinfo/sc-users
 >
_______________________________________________
sc-users mailing list
sc-users@...
http://lists.create.ucsb.edu/mailman/listinfo/sc-users

Re: NetAddr

by William Brent-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> why don't you just _use_ nil as the NetAddr in the responder?

Yep, it makes sense.  That's what I have done in the past.  On top of the security ambiguities you mentioned (which make it not so worthwhile to use a specific port with Pd), it would also be irritating to have to check which port Pd happens to be using each time I run it, because it's not consistent from one instance to the next (though, once launched, it sticks with the same port).

Occasionally, I just obsess about understanding exactly why things don't work when I expect them to. :) So - thanks for indulging me on that.  Everything is clear now.  And I think it raises a good issue for Pd and Max users.  From what I'm understanding, specifying everything in detail like this is maximally secure and reliable.  Maybe sendOSC and udpsend should be updated...



On Wed, Mar 5, 2008 at 12:20 PM, Oswald Berthold <opt@...> wrote:

hi all

just a couple of remarks regarding both issues ..

william:

why don't you just _use_ nil as the NetAddr in the responder?

if your concern is security, you should really take other action, like
filtering on the OS level or a router, because, afaics, in order to
determine the value of the addr argument, sclang has accepted the
(malicious) package already.

(
from the SC side, it would make sense to have a NetAddr object with a
wildcard port number, so you'd only set the IP address but leave the
originating port unspecified. but then, wildcards at this specific
point haven't been in the design for efficiency reasons, iirc.

from the PD side, it would of course make sense, while using UDP, to
use a single and fixed UDP port for both sending and receiving but
thats kind of incompatible with dumpOSC usage.
)

---------------------------------------

the listening port issue:

using the sclang program alone, you can indeed set the port number through a
commandline argument:

  -u <network-port-number>       Set UDP listening port (default
   57120)

haha, but then i'm confident the situation is different when you're using
the OSX SuperCollider Application (as Till pointed out).

a hack can always be something like this:

"nc -u -l -p 1234 | nc -u localhost:57120".unixCmd;

this uses netcat (nc), which i assume to be installed on a standard
OSX, to listen on an arbitrary udp port and redirect all packet to the
port where sc is listening.

there are alternative ways of accomplishing this redirect, like using
firewall rules again or some alternative userland utility like nc.

bst, opt

nescivi writes:
 > On Wednesday 05 March 2008 07:26:40 nonprivate wrote:
 > > hi, sorry to ask this again,
 > > but is it the case that sc can only listen to 57120, and does not
 > > respond to anything else? it seems like it to me, after recent
 > > experiments. if that isn't the case then i need to find out where i'm
 > > going wrong with this stuff.
 > > thanks.
 >
 > SC listens to NetAddr.langPort.
 > normally this is 57120
 >
 > sincerely,
 > Marije
 >
 > > Dipl.-Inf. Till Bovermann wrote:
 > > > On 05.03.2008, at 03:58, William Brent wrote:
 > > >>> o = OSCresponder(nil, '/chat', { |t, r, msg, addr|
 > > >>
 > > >> addr.postln; }).add;
 > > >>
 > > >> Bingo.  That gave the port.  I had tried to check with netstat as
 > > >> you suggested before, but this port never came up.  Pd doesn't use a
 > > >> consistent port number.  But now I know how to find it.
 > > >>
 > > >> Thanks for your patience on this.  I'll post to the Pd list and let
 > > >> them know about it.
 > > >
 > > > AFAIK it is because the standard example of provided by the osc guys
 > > > (sendOSC) don't care about the outgoing port. the pd sender simply
 > > > uses this slightly adapted code.
 > > >
 > > > regards
 > > > Till
 > > >
 > > > _______________________________________________
 > > > sc-users mailing list
 > > > sc-users@...
 > > > http://lists.create.ucsb.edu/mailman/listinfo/sc-users
 > >
 > > _______________________________________________
 > > sc-users mailing list
 > > sc-users@...
 > > http://lists.create.ucsb.edu/mailman/listinfo/sc-users
 >
 >
 > _______________________________________________
 > sc-users mailing list
 > sc-users@...
 > http://lists.create.ucsb.edu/mailman/listinfo/sc-users
 >
_______________________________________________
sc-users mailing list
sc-users@...
http://lists.create.ucsb.edu/mailman/listinfo/sc-users



--
William Brent

"Great minds flock together"
Conflations: conversational idiom for the 21st century

www.conflations.com
_______________________________________________
sc-users mailing list
sc-users@...
http://lists.create.ucsb.edu/mailman/listinfo/sc-users

Re: NetAddr

by nescivi :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hiho,

On Wednesday 05 March 2008 12:23:57 nonprivate wrote:
> hi marie, thanks for the reply!
> i'm obviously getting confused, because i thought sc could only listen
> to things coming in from 57120? which is what i thought you and till
> said before.
> and if i use the monome or akaRemote, and set them to send to a port
> number that isn't 57120, sc doesn't get anything. max/msp picks up
> everything though.

it seems to be a difficult concept.

app A sends a message out *from* port XXXX
*to* port 57120, on which SuperCollider listens.

so
appA -> port XXXX -> port 57120 -> SClang

upon startup SC picks a port to listen to, normally 57120, if that isn't
available, it takes the next one, and so on. The current can always be
checked by NetAddr.langPort

To send a UDP message, an application needs to open up a port, kick the
message out of that port, in the direction of the port the message needs to
go to, on that port another application may or may not be listening.

sincerely,
Marije

>
> nescivi wrote:
> > Hiho,
> >
> > On Wednesday 05 March 2008 10:51:40 nonprivate wrote:
> >> thanks till, it does help to know that!
> >> in that case, it doesn't really make sense to specify a port for
> >> OSCresponder to listen to, does it (?)
> >
> > yes, it does.
> > It determines to listen for messages coming *from* a specific port.


_______________________________________________
sc-users mailing list
sc-users@...
http://lists.create.ucsb.edu/mailman/listinfo/sc-users

Re: NetAddr

by nonprivate :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

hi marije (sorry the j got lost last time) thanks again,
so the port in the OSCresponder argument is to specify the port that the
message is being sent from (ie port XXXX in your example) is that correct?

(i don't mean to drive you crazy, replying is optional...)

nescivi wrote:

> Hiho,
>
> On Wednesday 05 March 2008 12:23:57 nonprivate wrote:
>  
>> hi marie, thanks for the reply!
>> i'm obviously getting confused, because i thought sc could only listen
>> to things coming in from 57120? which is what i thought you and till
>> said before.
>> and if i use the monome or akaRemote, and set them to send to a port
>> number that isn't 57120, sc doesn't get anything. max/msp picks up
>> everything though.
>>    
>
> it seems to be a difficult concept.
>
> app A sends a message out *from* port XXXX
> *to* port 57120, on which SuperCollider listens.
>
> so
> appA -> port XXXX -> port 57120 -> SClang
>
> upon startup SC picks a port to listen to, normally 57120, if that isn't
> available, it takes the next one, and so on. The current can always be
> checked by NetAddr.langPort
>
> To send a UDP message, an application needs to open up a port, kick the
> message out of that port, in the direction of the port the message needs to
> go to, on that port another application may or may not be listening.
>
> sincerely,
> Marije
>
>  
>> nescivi wrote:
>>    
>>> Hiho,
>>>
>>> On Wednesday 05 March 2008 10:51:40 nonprivate wrote:
>>>      
>>>> thanks till, it does help to know that!
>>>> in that case, it doesn't really make sense to specify a port for
>>>> OSCresponder to listen to, does it (?)
>>>>        
>>> yes, it does.
>>> It determines to listen for messages coming *from* a specific port.
>>>      
>
>
> _______________________________________________
> sc-users mailing list
> sc-users@...
> http://lists.create.ucsb.edu/mailman/listinfo/sc-users
>
>  

_______________________________________________
sc-users mailing list
sc-users@...
http://lists.create.ucsb.edu/mailman/listinfo/sc-users

Re: NetAddr

by nescivi :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wednesday 05 March 2008 19:34:08 nonprivate wrote:
> hi marije (sorry the j got lost last time) thanks again,
> so the port in the OSCresponder argument is to specify the port that the
> message is being sent from (ie port XXXX in your example) is that correct?

yes.


>
> (i don't mean to drive you crazy, replying is optional...)
>
> nescivi wrote:
> > Hiho,
> >
> > On Wednesday 05 March 2008 12:23:57 nonprivate wrote:
> >> hi marie, thanks for the reply!
> >> i'm obviously getting confused, because i thought sc could only listen
> >> to things coming in from 57120? which is what i thought you and till
> >> said before.
> >> and if i use the monome or akaRemote, and set them to send to a port
> >> number that isn't 57120, sc doesn't get anything. max/msp picks up
> >> everything though.
> >
> > it seems to be a difficult concept.
> >
> > app A sends a message out *from* port XXXX
> > *to* port 57120, on which SuperCollider listens.
> >
> > so
> > appA -> port XXXX -> port 57120 -> SClang
> >
> > upon startup SC picks a port to listen to, normally 57120, if that isn't
> > available, it takes the next one, and so on. The current can always be
> > checked by NetAddr.langPort
> >
> > To send a UDP message, an application needs to open up a port, kick the
> > message out of that port, in the direction of the port the message needs
> > to go to, on that port another application may or may not be listening.
> >
> > sincerely,
> > Marije
> >
> >> nescivi wrote:
> >>> Hiho,
> >>>
> >>> On Wednesday 05 March 2008 10:51:40 nonprivate wrote:
> >>>> thanks till, it does help to know that!
> >>>> in that case, it doesn't really make sense to specify a port for
> >>>> OSCresponder to listen to, does it (?)
> >>>
> >>> yes, it does.
> >>> It determines to listen for messages coming *from* a specific port.
> >
> > _______________________________________________
> > sc-users mailing list
> > sc-users@...
> > http://lists.create.ucsb.edu/mailman/listinfo/sc-users


_______________________________________________
sc-users mailing list
sc-users@...
http://lists.create.ucsb.edu/mailman/listinfo/sc-users
< Prev | 1 - 2 - 3 | Next >