touchOSC

Aug 10, 2009 at 8:24pm

touchOSC

alright gang, im not sure whats going on here, its been a while since ive used max but im stumped on this really simple thing

below is the code, i thought id have a go at using the ol iphone in max and im having issues with whats coming out. the received messages i just want an number coming from a slider but it doesnt seem to be routing right.

not sure what im doing wrong here, think its something annoyingly simple.

hope that makes sense. cheers

{
“boxes” : [ {
"box" : {
"maxclass" : "newobj",
"text" : "print HELLO",
"patching_rect" : [ 7.0, 293.0, 60.0, 17.0 ],
“fontsize” : 9.0,
“numinlets” : 1,
“fontname” : “Arial”,
“numoutlets” : 0,
“presentation_rect” : [ 7.0, 293.0, 0.0, 0.0 ],
“id” : “obj-38″
}

}
, {
“box” : {
“maxclass” : “newobj”,
“text” : “route /fader1″,
“outlettype” : [ "", "" ],
“patching_rect” : [ 28.0, 251.0, 79.0, 20.0 ],
“fontsize” : 12.0,
“numinlets” : 1,
“fontname” : “Arial”,
“numoutlets” : 2,
“id” : “obj-19″
}

}
, {
“box” : {
“maxclass” : “newobj”,
“text” : “prepend set”,
“outlettype” : [ "" ],
“patching_rect” : [ 81.0, 156.0, 62.0, 17.0 ],
“fontsize” : 9.0,
“numinlets” : 1,
“fontname” : “Arial”,
“numoutlets” : 1,
“presentation_rect” : [ 81.0, 156.0, 0.0, 0.0 ],
“id” : “obj-15″
}

}
, {
“box” : {
“maxclass” : “message”,
“text” : “/1/fader1 0.345992″,
“linecount” : 2,
“outlettype” : [ "" ],
“patching_rect” : [ 81.0, 194.0, 77.0, 25.0 ],
“fontsize” : 9.0,
“numinlets” : 2,
“fontname” : “Arial”,
“numoutlets” : 1,
“presentation_rect” : [ 81.0, 194.0, 0.0, 0.0 ],
“id” : “obj-17″
}

}
, {
“box” : {
“maxclass” : “comment”,
“text” : “Sending values to the iPhone on port 8001.”,
“linecount” : 2,
“patching_rect” : [ 254.0, 40.0, 136.0, 27.0 ],
“fontsize” : 9.0,
“numinlets” : 1,
“fontname” : “Arial”,
“numoutlets” : 0,
“id” : “obj-2″
}

}
, {
“box” : {
“maxclass” : “comment”,
“text” : “Receiving values from the iPhone on port 8000.”,
“linecount” : 2,
“patching_rect” : [ 28.0, 39.0, 136.0, 27.0 ],
“fontsize” : 9.0,
“numinlets” : 1,
“fontname” : “Arial”,
“numoutlets” : 0,
“id” : “obj-3″
}

}
, {
“box” : {
“maxclass” : “newobj”,
“text” : “prepend set”,
“outlettype” : [ "" ],
“patching_rect” : [ 292.0, 111.0, 62.0, 17.0 ],
“fontsize” : 9.0,
“numinlets” : 1,
“fontname” : “Arial”,
“numoutlets” : 1,
“id” : “obj-6″
}

}
, {
“box” : {
“maxclass” : “flonum”,
“outlettype” : [ "float", "bang" ],
“minimum” : 0.0,
“patching_rect” : [ 292.0, 82.0, 35.0, 17.0 ],
“htextcolor” : [ 0.870588, 0.870588, 0.870588, 1.0 ],
“bgcolor” : [ 0.866667, 0.866667, 0.866667, 1.0 ],
“triscale” : 0.9,
“fontsize” : 9.0,
“maximum” : 1.0,
“numinlets” : 1,
“fontname” : “Arial”,
“numoutlets” : 2,
“id” : “obj-7″
}

}
, {
“box” : {
“maxclass” : “newobj”,
“text” : “print OSC”,
“patching_rect” : [ 100.0, 122.0, 53.0, 17.0 ],
“fontsize” : 9.0,
“numinlets” : 1,
“fontname” : “Arial”,
“numoutlets” : 0,
“id” : “obj-8″
}

}
, {
“box” : {
“maxclass” : “newobj”,
“text” : “udpreceive 8000″,
“outlettype” : [ "" ],
“patching_rect” : [ 29.0, 82.0, 86.0, 17.0 ],
“fontsize” : 9.0,
“numinlets” : 1,
“fontname” : “Arial”,
“numoutlets” : 1,
“id” : “obj-9″
}

}
, {
“box” : {
“maxclass” : “button”,
“outlettype” : [ "bang" ],
“patching_rect” : [ 255.0, 112.0, 15.0, 15.0 ],
“numinlets” : 1,
“numoutlets” : 1,
“id” : “obj-10″
}

}
, {
“box” : {
“maxclass” : “newobj”,
“text” : “prepend /1/fader1″,
“outlettype” : [ "" ],
“patching_rect” : [ 292.0, 170.0, 96.0, 17.0 ],
“fontsize” : 9.0,
“numinlets” : 1,
“fontname” : “Arial”,
“numoutlets” : 1,
“id” : “obj-11″
}

}
, {
“box” : {
“maxclass” : “message”,
“text” : “0.6″,
“outlettype” : [ "" ],
“patching_rect” : [ 292.0, 149.0, 77.0, 15.0 ],
“fontsize” : 9.0,
“numinlets” : 2,
“fontname” : “Arial”,
“numoutlets” : 1,
“id” : “obj-12″
}

}
, {
“box” : {
“maxclass” : “newobj”,
“text” : “udpsend 192.168.1.65 8001″,
“patching_rect” : [ 292.0, 201.0, 123.0, 17.0 ],
“fontsize” : 9.0,
“numinlets” : 1,
“fontname” : “Arial”,
“numoutlets” : 0,
“id” : “obj-13″
}

}
, {
“box” : {
“maxclass” : “comment”,
“text” : ” iphone IP address”,
“patching_rect” : [ 331.0, 220.0, 106.0, 17.0 ],
“fontsize” : 9.0,
“numinlets” : 1,
“fontname” : “Arial”,
“numoutlets” : 0,
“id” : “obj-14″
}

}
],
“lines” : [ {
"patchline" : {
"source" : [ "obj-19", 0 ],
“destination” : [ "obj-38", 0 ],
“hidden” : 0,
“midpoints” : [ ]
}

}
, {
“patchline” : {
“source” : [ "obj-9", 0 ],
“destination” : [ "obj-19", 0 ],
“hidden” : 0,
“midpoints” : [ ]
}

}
, {
“patchline” : {
“source” : [ "obj-11", 0 ],
“destination” : [ "obj-13", 0 ],
“hidden” : 0,
“midpoints” : [ ]
}

}
, {
“patchline” : {
“source” : [ "obj-9", 0 ],
“destination” : [ "obj-15", 0 ],
“hidden” : 0,
“midpoints” : [ ]
}

}
, {
“patchline” : {
“source” : [ "obj-15", 0 ],
“destination” : [ "obj-17", 0 ],
“hidden” : 0,
“midpoints” : [ ]
}

}
, {
“patchline” : {
“source” : [ "obj-9", 0 ],
“destination” : [ "obj-8", 0 ],
“hidden” : 0,
“midpoints” : [ ]
}

}
, {
“patchline” : {
“source” : [ "obj-7", 0 ],
“destination” : [ "obj-10", 0 ],
“hidden” : 0,
“midpoints” : [ 301.5, 105.0, 264.0, 105.0 ]
}

}
, {
“patchline” : {
“source” : [ "obj-7", 0 ],
“destination” : [ "obj-6", 0 ],
“hidden” : 0,
“midpoints” : [ ]
}

}
, {
“patchline” : {
“source” : [ "obj-10", 0 ],
“destination” : [ "obj-12", 0 ],
“hidden” : 0,
“midpoints” : [ 264.0, 144.0, 301.5, 144.0 ]
}

}
, {
“patchline” : {
“source” : [ "obj-6", 0 ],
“destination” : [ "obj-12", 0 ],
“hidden” : 0,
“midpoints” : [ ]
}

}
, {
“patchline” : {
“source” : [ "obj-12", 0 ],
“destination” : [ "obj-11", 0 ],
“hidden” : 0,
“midpoints” : [ ]
}

}
]
}

#45067
Aug 11, 2009 at 12:26pm

If you want to use “route” you have to specify the whole
string you want to remove. Route does not route substrings.
[route /1/fader1] should do what you want.

Also, when copying patches to the forum, please use copy compressed.

#162418
Aug 11, 2009 at 12:46pm

There are quite a few Max patch examples here:
http://hexler.net/software/touchosc

that show how to send/receive the OSC data from the TouchOSC.

You also may need to get the files from CNMAT to use some of these files.

http://cnmat.berkeley.edu/downloads

Hope this helps,
Mitch

#162419
Aug 13, 2009 at 2:03pm

Get christopher willits patches, they worked for me when i tried to get touch osc working last week. you will still need to get the cnmat externals though.

http://www.christopherwillits.com/index.php?s=touch+osc

#162420

You must be logged in to reply to this topic.