| 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" |