Forums > MaxMSP

How do you use the hi object to convert signal from usb game pad to midi?

April 8, 2009 | 11:20 pm



baz
April 9, 2009 | 3:16 pm

{
"patcher" : {
"fileversion" : 1,
"rect" : [ 25.0, 69.0, 793.0, 543.0 ],
"bglocked" : 0,
"defrect" : [ 25.0, 69.0, 793.0, 543.0 ],
"openrect" : [ 0.0, 0.0, 0.0, 0.0 ],
"openinpresentation" : 0,
"default_fontsize" : 12.0,
"default_fontface" : 0,
"default_fontname" : "Arial",
"gridonopen" : 0,
"gridsize" : [ 15.0, 15.0 ],
"gridsnaponopen" : 0,
"toolbarvisible" : 1,
"boxanimatetime" : 200,
"imprint" : 0,
"boxes" : [ {
"box" : {
"maxclass" : "comment",
"text" : "< midi note 60",
"presentation_rect" : [ 556.0, 341.0, 0.0, 0.0 ],
"fontsize" : 12.0,
"patching_rect" : [ 556.0, 341.0, 150.0, 20.0 ],
"id" : "obj-12",
"numinlets" : 1,
"numoutlets" : 0,
"fontname" : "Arial"
}

}
, {
"box" : {
"maxclass" : "newobj",
"text" : "pak 60 0",
"outlettype" : [ "" ],
"fontsize" : 12.0,
"patching_rect" : [ 495.0, 340.0, 57.0, 20.0 ],
"id" : "obj-11",
"numinlets" : 2,
"numoutlets" : 1,
"fontname" : "Arial"
}

}
, {
"box" : {
"maxclass" : "newobj",
"text" : "noteout",
"fontsize" : 12.0,
"patching_rect" : [ 495.0, 375.0, 51.0, 20.0 ],
"id" : "obj-10",
"numinlets" : 3,
"numoutlets" : 0,
"fontname" : "Arial"
}

}
, {
"box" : {
"maxclass" : "newobj",
"text" : "* 100",
"outlettype" : [ "int" ],
"fontsize" : 12.0,
"patching_rect" : [ 532.0, 311.0, 39.0, 20.0 ],
"id" : "obj-8",
"numinlets" : 2,
"numoutlets" : 1,
"fontname" : "Arial"
}

}
, {
"box" : {
"maxclass" : "comment",
"text" : "< button",
"presentation_rect" : [ 410.0, 305.0, 0.0, 0.0 ],
"fontsize" : 12.0,
"patching_rect" : [ 571.0, 313.0, 150.0, 20.0 ],
"id" : "obj-9",
"numinlets" : 1,
"numoutlets" : 0,
"fontname" : "Arial"
}

}
, {
"box" : {
"maxclass" : "newobj",
"text" : "scale 0 255 0 127",
"outlettype" : [ "int" ],
"fontsize" : 12.0,
"patching_rect" : [ 251.0, 303.0, 105.0, 20.0 ],
"id" : "obj-7",
"numinlets" : 6,
"numoutlets" : 1,
"fontname" : "Arial"
}

}
, {
"box" : {
"maxclass" : "comment",
"text" : "continuous control >",
"presentation_rect" : [ 320.0, 308.0, 0.0, 0.0 ],
"fontsize" : 12.0,
"patching_rect" : [ 101.0, 305.0, 150.0, 20.0 ],
"id" : "obj-6",
"numinlets" : 1,
"numoutlets" : 0,
"fontname" : "Arial"
}

}
, {
"box" : {
"maxclass" : "comment",
"text" : "< may want to assign channel here >",
"linecount" : 2,
"fontsize" : 12.0,
"patching_rect" : [ 307.0, 362.0, 150.0, 34.0 ],
"id" : "obj-5",
"numinlets" : 1,
"numoutlets" : 0,
"fontname" : "Arial"
}

}
, {
"box" : {
"maxclass" : "newobj",
"text" : "ctlout",
"fontsize" : 12.0,
"patching_rect" : [ 252.0, 362.0, 46.0, 20.0 ],
"id" : "obj-4",
"numinlets" : 3,
"numoutlets" : 0,
"fontname" : "Arial"
}

}
, {
"box" : {
"maxclass" : "comment",
"text" : "< imagine these are the numbers my usb controller is sending on",
"linecount" : 3,
"fontsize" : 12.0,
"patching_rect" : [ 382.0, 209.0, 168.0, 48.0 ],
"id" : "obj-3",
"numinlets" : 1,
"numoutlets" : 0,
"fontname" : "Arial"
}

}
, {
"box" : {
"maxclass" : "newobj",
"text" : "route 12 13 14 15 16",
"outlettype" : [ "", "", "", "", "", "" ],
"fontsize" : 12.0,
"patching_rect" : [ 252.0, 212.0, 121.0, 20.0 ],
"id" : "obj-2",
"numinlets" : 1,
"numoutlets" : 6,
"fontname" : "Arial"
}

}
, {
"box" : {
"maxclass" : "newobj",
"text" : "hi",
"outlettype" : [ "list", "" ],
"fontsize" : 12.0,
"patching_rect" : [ 251.0, 156.0, 32.5, 20.0 ],
"id" : "obj-1",
"numinlets" : 1,
"numoutlets" : 2,
"fontname" : "Arial"
}

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

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

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

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

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

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

}
]
}

}



baz
April 9, 2009 | 3:24 pm

And next time I’ll read that stuff about "Copy Compressed".


April 10, 2009 | 2:59 am

this may be a stupid question but how can i transfer that text in to the patch? im not sure what im supposed to do with it. i probably should have mentioned im using max/msp 4.5 not max 5 if that makes a difference.



baz
April 10, 2009 | 3:54 pm

A picture attached – here is a Supercollider code that translates max5 > max4.6:

http://www.fredrikolofsson.com/pages/code-sc.html

I think it may only be for Compressed Copy. You’ll probably want it, since I’m not seeing a lot of patches pasted here from 4.6.


Viewing 5 posts - 1 through 5 (of 5 total)