Csound Csound-dev Csound-tekno Search About

[Csnd] OSC listen problem

Date2010-02-09 14:18
FromMaximP
Subject[Csnd] OSC listen problem
Hi,
I'm trying to receive a messagges from MAX 5 using the OSC protocol, but I
don't understand the meaning of the "idest". I wrote the address of the
max5's file (with directories and filename) but it doesn't work.


          gihandle OSCinit 7002
;--------------------------------------- 

instr 1
 
        kf1 init 0
        nxtmsg:
           kk  OSClisten gihandle,
"C:/Users/Max/Desktop/csound+max/03cUDPNetworking.maxpat" , "i", kf1
           if (kk == 0) goto ex
           printk 1,kf1
           kgoto nxtmsg
       ex:

endin


Thank you for your help!!!

Date2010-02-09 14:21
FromVictor Lazzarini
Subject[Csnd] Re: OSC listen problem
The address should be the OSC address of the message you sent from Max:

eg. /my/message

it has to match the one in the message you sent. It is not supposed to  
be a file path.


Victor
On 9 Feb 2010, at 14:18, MaximP wrote:

>
> Hi,
> I'm trying to receive a messagges from MAX 5 using the OSC protocol,  
> but I
> don't understand the meaning of the "idest". I wrote the address of  
> the
> max5's file (with directories and filename) but it doesn't work.
>
>
>          gihandle OSCinit 7002
> ;---------------------------------------
>
> instr 1
>
>        kf1 init 0
>        nxtmsg:
>           kk  OSClisten gihandle,
> "C:/Users/Max/Desktop/csound+max/03cUDPNetworking.maxpat" , "i", kf1
>           if (kk == 0) goto ex
>           printk 1,kf1
>           kgoto nxtmsg
>       ex:
>
> endin
>
>
> Thank you for your help!!!
> -- 
> View this message in context: http://old.nabble.com/OSC-listen-problem-tp27514287p27514287.html
> Sent from the Csound - General mailing list archive at Nabble.com.
>
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
> "unsubscribe csound"



Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2010-02-09 14:29
FromPeiman Khosravi
Subject[Csnd] Re: OSC listen problem
Hi, I just made a max5 patch last night to communicate with csound  
thorough OSC. See the csd and max5 code below.




-d



sr = 96000
ksmps = 100
nchnls = 2

gihandle OSCinit 7770

instr 2
kval init 0
;nxtmsg:
kans OSClisten gihandle,"/foo","i", kval
;if (kans == 0) goto done
printk2 kval
;	kgoto nxtmsg
;done:
endin



i 2 0 3600



and the max5 code:


{
	"boxes" : [ 		{
			"box" : 			{
				"maxclass" : "number",
				"numinlets" : 1,
				"patching_rect" : [ 78.0, 104.0, 50.0, 20.0 ],
				"id" : "obj-2",
				"numoutlets" : 2,
				"fontname" : "Arial",
				"outlettype" : [ "int", "bang" ],
				"fontsize" : 12.0
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "newobj",
				"text" : "prepend /foo",
				"numinlets" : 1,
				"patching_rect" : [ 78.0, 141.0, 78.0, 20.0 ],
				"id" : "obj-10",
				"numoutlets" : 1,
				"fontname" : "Arial",
				"outlettype" : [ "" ],
				"fontsize" : 12.0
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "newobj",
				"text" : "udpsend 127.0.0.1 7770",
				"numinlets" : 1,
				"patching_rect" : [ 78.0, 167.0, 140.0, 20.0 ],
				"id" : "obj-1",
				"numoutlets" : 0,
				"fontname" : "Arial",
				"fontsize" : 12.0
			}

		}
  ],
	"lines" : [ 		{
			"patchline" : 			{
				"source" : [ "obj-2", 0 ],
				"destination" : [ "obj-10", 0 ],
				"hidden" : 0,
				"midpoints" : [  ]
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-10", 0 ],
				"destination" : [ "obj-1", 0 ],
				"hidden" : 0,
				"midpoints" : [  ]
			}

		}
  ]
}


Best

Peiman

On 9 Feb 2010, at 14:18, MaximP wrote:

>
> Hi,
> I'm trying to receive a messagges from MAX 5 using the OSC protocol,  
> but I
> don't understand the meaning of the "idest". I wrote the address of  
> the
> max5's file (with directories and filename) but it doesn't work.
>
>
>          gihandle OSCinit 7002
> ;---------------------------------------
>
> instr 1
>
>        kf1 init 0
>        nxtmsg:
>           kk  OSClisten gihandle,
> "C:/Users/Max/Desktop/csound+max/03cUDPNetworking.maxpat" , "i", kf1
>           if (kk == 0) goto ex
>           printk 1,kf1
>           kgoto nxtmsg
>       ex:
>
> endin
>
>
> Thank you for your help!!!
> -- 
> View this message in context: http://old.nabble.com/OSC-listen-problem-tp27514287p27514287.html
> Sent from the Csound - General mailing list archive at Nabble.com.
>
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
> "unsubscribe csound"



Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2010-02-09 14:34
FromPeiman Khosravi
Subject[Csnd] Re: Re: OSC listen problem
yes so if your idest is "/my/message" then you would attach [udpsend]  
to the output of a message box like [/my/message 100]. That is the  
address followed by the OSC message. Note that the message type has to  
match that of itype - in the above case it is an integer and so itype  
should be "i".

Best,

P



On 9 Feb 2010, at 14:21, Victor Lazzarini wrote:

> The address should be the OSC address of the message you sent from  
> Max:
>
> eg. /my/message
>
> it has to match the one in the message you sent. It is not supposed  
> to be a file path.
>
>
> Victor
> On 9 Feb 2010, at 14:18, MaximP wrote:
>
>>
>> Hi,
>> I'm trying to receive a messagges from MAX 5 using the OSC  
>> protocol, but I
>> don't understand the meaning of the "idest". I wrote the address of  
>> the
>> max5's file (with directories and filename) but it doesn't work.
>>
>>
>>         gihandle OSCinit 7002
>> ;---------------------------------------
>>
>> instr 1
>>
>>       kf1 init 0
>>       nxtmsg:
>>          kk  OSClisten gihandle,
>> "C:/Users/Max/Desktop/csound+max/03cUDPNetworking.maxpat" , "i", kf1
>>          if (kk == 0) goto ex
>>          printk 1,kf1
>>          kgoto nxtmsg
>>      ex:
>>
>> endin
>>
>>
>> Thank you for your help!!!
>> -- 
>> View this message in context: http://old.nabble.com/OSC-listen-problem-tp27514287p27514287.html
>> Sent from the Csound - General mailing list archive at Nabble.com.
>>
>>
>>
>> Send bugs reports to this list.
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
>> "unsubscribe csound"
>
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
> "unsubscribe csound"



Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2010-02-09 14:42
FromMaximP
Subject[Csnd] Re: OSC listen problem
thank you very much!!!!