Making a simple video sampler


    May 27 2013 | 1:18 am
    Hi there, I'm pretty uninformed when it comes to max msp and I'm currently trying to make a video based sampler. I want it, ultimately, to have a interface similar to an MPC but instead of recording audio to a buffer I want to be able to trigger video samples instead to different sub pwindows. I've made a rough patch showing what I want fundamentally with the patch (very rough). All I want to do really is replace the audio buffers with some sort of video buffer. Is there a simple way of doing this?
    Thanks for any help!
    Here's what I have so far:
    {
    "boxes" : [         {
    "box" :             {
    "maxclass" : "comment",
    "text" : "keys 1 - 6 trigger buffers",
    "presentation_rect" : [ 90.5, 246.0, 0.0, 0.0 ],
    "numoutlets" : 0,
    "patching_rect" : [ 92.0, 260.0, 150.0, 20.0 ],
    "id" : "obj-14",
    "fontname" : "Arial",
    "fontsize" : 12.0,
    "numinlets" : 1
    }
    }
    ,         {
    "box" :             {
    "maxclass" : "comment",
    "text" : "click buttons with 8 second countdown to record to buffer",
    "linecount" : 3,
    "numoutlets" : 0,
    "patching_rect" : [ 84.5, 32.0, 150.0, 48.0 ],
    "id" : "obj-4",
    "fontname" : "Arial",
    "fontsize" : 12.0,
    "numinlets" : 1
    }
    }
    ,         {
    "box" :             {
    "maxclass" : "number",
    "numoutlets" : 2,
    "outlettype" : [ "int", "bang" ],
    "patching_rect" : [ 614.0, 647.0, 50.0, 20.0 ],
    "id" : "obj-59",
    "fontname" : "Arial",
    "parameter_enable" : 0,
    "fontsize" : 12.0,
    "numinlets" : 1
    }
    }
    ,         {
    "box" :             {
    "maxclass" : "levelmeter~",
    "numoutlets" : 1,
    "outlettype" : [ "int" ],
    "patching_rect" : [ 602.0, 227.0, 128.0, 64.0 ],
    "id" : "obj-3",
    "numinlets" : 1
    }
    }
    ,         {
    "box" :             {
    "maxclass" : "newobj",
    "text" : "keyup",
    "numoutlets" : 4,
    "outlettype" : [ "int", "int", "int", "int" ],
    "patching_rect" : [ 544.0, 591.0, 59.5, 20.0 ],
    "id" : "obj-94",
    "fontname" : "Arial",
    "fontsize" : 12.0,
    "numinlets" : 0
    }
    }
    ,         {
    "box" :             {
    "maxclass" : "number",
    "numoutlets" : 2,
    "outlettype" : [ "int", "bang" ],
    "patching_rect" : [ 499.5, 184.0, 50.0, 20.0 ],
    "id" : "obj-93",
    "fontname" : "Arial",
    "parameter_enable" : 0,
    "fontsize" : 12.0,
    "numinlets" : 1
    }
    }
    ,         {
    "box" :             {
    "maxclass" : "number",
    "numoutlets" : 2,
    "outlettype" : [ "int", "bang" ],
    "patching_rect" : [ 418.0, 184.0, 50.0, 20.0 ],
    "id" : "obj-91",
    "fontname" : "Arial",
    "parameter_enable" : 0,
    "fontsize" : 12.0,
    "numinlets" : 1
    }
    }
    ,         {
    "box" :             {
    "maxclass" : "number",
    "numoutlets" : 2,
    "outlettype" : [ "int", "bang" ],
    "patching_rect" : [ 332.5, 184.0, 50.0, 20.0 ],
    "id" : "obj-89",
    "fontname" : "Arial",
    "parameter_enable" : 0,
    "fontsize" : 12.0,
    "numinlets" : 1
    }
    }
    ,         {
    "box" :             {
    "maxclass" : "number",
    "numoutlets" : 2,
    "outlettype" : [ "int", "bang" ],
    "patching_rect" : [ 251.0, 183.0, 50.0, 20.0 ],
    "id" : "obj-87",
    "fontname" : "Arial",
    "parameter_enable" : 0,
    "fontsize" : 12.0,
    "numinlets" : 1
    }
    }
    ,         {
    "box" :             {
    "maxclass" : "number",
    "numoutlets" : 2,
    "outlettype" : [ "int", "bang" ],
    "patching_rect" : [ 173.5, 183.0, 50.0, 20.0 ],
    "id" : "obj-85",
    "fontname" : "Arial",
    "parameter_enable" : 0,
    "fontsize" : 12.0,
    "numinlets" : 1
    }
    }
    ,         {
    "box" :             {
    "maxclass" : "number",
    "numoutlets" : 2,
    "outlettype" : [ "int", "bang" ],
    "patching_rect" : [ 92.0, 183.0, 50.0, 20.0 ],
    "id" : "obj-83",
    "fontname" : "Arial",
    "parameter_enable" : 0,
    "fontsize" : 12.0,
    "numinlets" : 1
    }
    }
    ,         {
    "box" :             {
    "maxclass" : "newobj",
    "text" : "s samp6",
    "numoutlets" : 0,
    "patching_rect" : [ 507.0, 399.0, 56.0, 20.0 ],
    "id" : "obj-71",
    "fontname" : "Arial",
    "fontsize" : 12.0,
    "numinlets" : 1
    }
    }
    ,         {
    "box" :             {
    "maxclass" : "newobj",
    "text" : "s samp5",
    "numoutlets" : 0,
    "patching_rect" : [ 424.0, 399.0, 56.0, 20.0 ],
    "id" : "obj-70",
    "fontname" : "Arial",
    "fontsize" : 12.0,
    "numinlets" : 1
    }
    }
    ,         {
    "box" :             {
    "maxclass" : "newobj",
    "text" : "s samp4",
    "numoutlets" : 0,
    "patching_rect" : [ 341.0, 399.0, 56.0, 20.0 ],
    "id" : "obj-69",
    "fontname" : "Arial",
    "fontsize" : 12.0,
    "numinlets" : 1
    }
    }
    ,         {
    "box" :             {
    "maxclass" : "newobj",
    "text" : "s samp3",
    "numoutlets" : 0,
    "patching_rect" : [ 258.0, 399.0, 56.0, 20.0 ],
    "id" : "obj-68",
    "fontname" : "Arial",
    "fontsize" : 12.0,
    "numinlets" : 1
    }
    }
    ,         {
    "box" :             {
    "maxclass" : "newobj",
    "text" : "s samp2",
    "numoutlets" : 0,
    "patching_rect" : [ 175.0, 399.0, 56.0, 20.0 ],
    "id" : "obj-67",
    "fontname" : "Arial",
    "fontsize" : 12.0,
    "numinlets" : 1
    }
    }
    ,         {
    "box" :             {
    "maxclass" : "newobj",
    "text" : "sel 54",
    "numoutlets" : 2,
    "outlettype" : [ "bang", "" ],
    "patching_rect" : [ 507.0, 348.0, 83.0, 20.0 ],
    "id" : "obj-66",
    "fontname" : "Arial",
    "fontsize" : 12.0,
    "numinlets" : 2
    }
    }
    ,         {
    "box" :             {
    "maxclass" : "newobj",
    "text" : "sel 53",
    "numoutlets" : 2,
    "outlettype" : [ "bang", "" ],
    "patching_rect" : [ 424.0, 348.0, 83.0, 20.0 ],
    "id" : "obj-65",
    "fontname" : "Arial",
    "fontsize" : 12.0,
    "numinlets" : 2
    }
    }
    ,         {
    "box" :             {
    "maxclass" : "newobj",
    "text" : "sel 52",
    "numoutlets" : 2,
    "outlettype" : [ "bang", "" ],
    "patching_rect" : [ 341.0, 348.0, 83.0, 20.0 ],
    "id" : "obj-64",
    "fontname" : "Arial",
    "fontsize" : 12.0,
    "numinlets" : 2
    }
    }
    ,         {
    "box" :             {
    "maxclass" : "newobj",
    "text" : "sel 51",
    "numoutlets" : 2,
    "outlettype" : [ "bang", "" ],
    "patching_rect" : [ 258.0, 348.0, 83.0, 20.0 ],
    "id" : "obj-63",
    "fontname" : "Arial",
    "fontsize" : 12.0,
    "numinlets" : 2
    }
    }
    ,         {
    "box" :             {
    "maxclass" : "newobj",
    "text" : "sel 50",
    "numoutlets" : 2,
    "outlettype" : [ "bang", "" ],
    "patching_rect" : [ 175.0, 348.0, 83.0, 20.0 ],
    "id" : "obj-62",
    "fontname" : "Arial",
    "fontsize" : 12.0,
    "numinlets" : 2
    }
    }
    ,         {
    "box" :             {
    "maxclass" : "button",
    "numoutlets" : 1,
    "outlettype" : [ "bang" ],
    "patching_rect" : [ 56.25, 377.0, 20.0, 20.0 ],
    "id" : "obj-58",
    "numinlets" : 1
    }
    }
    ,         {
    "box" :             {
    "maxclass" : "newobj",
    "text" : "s samp1",
    "numoutlets" : 0,
    "patching_rect" : [ 92.0, 399.0, 56.0, 20.0 ],
    "id" : "obj-53",
    "fontname" : "Arial",
    "fontsize" : 12.0,
    "numinlets" : 1
    }
    }
    ,         {
    "box" :             {
    "maxclass" : "newobj",
    "text" : "sel 49",
    "numoutlets" : 2,
    "outlettype" : [ "bang", "" ],
    "patching_rect" : [ 92.0, 348.0, 83.0, 20.0 ],
    "id" : "obj-50",
    "fontname" : "Arial",
    "fontsize" : 12.0,
    "numinlets" : 2
    }
    }
    ,         {
    "box" :             {
    "maxclass" : "newobj",
    "text" : "patcher playbuffers",
    "numoutlets" : 1,
    "outlettype" : [ "signal" ],
    "patching_rect" : [ 627.0, 134.0, 112.0, 20.0 ],
    "id" : "obj-49",
    "fontname" : "Arial",
    "fontsize" : 12.0,
    "numinlets" : 0,
    "patcher" :                 {
    "fileversion" : 1,
    "appversion" :                     {
    "major" : 6,
    "minor" : 0,
    "revision" : 1
    }
    ,
    "rect" : [ 410.0, 202.0, 844.0, 711.0 ],
    "bglocked" : 0,
    "openinpresentation" : 0,
    "default_fontsize" : 12.0,
    "default_fontface" : 0,
    "default_fontname" : "Arial",
    "gridonopen" : 0,
    "gridsize" : [ 15.0, 15.0 ],
    "gridsnaponopen" : 0,
    "statusbarvisible" : 2,
    "toolbarvisible" : 1,
    "boxanimatetime" : 200,
    "imprint" : 0,
    "enablehscroll" : 1,
    "enablevscroll" : 1,
    "devicewidth" : 0.0,
    "description" : "",
    "digest" : "",
    "tags" : "",
    "boxes" : [                         {
    "box" :                             {
    "maxclass" : "outlet",
    "numoutlets" : 0,
    "patching_rect" : [ 494.0, 567.0, 25.0, 25.0 ],
    "id" : "obj-3",
    "numinlets" : 1,
    "comment" : ""
    }
    }
    ,                         {
    "box" :                             {
    "maxclass" : "newobj",
    "text" : "r samp6",
    "numoutlets" : 1,
    "outlettype" : [ "" ],
    "patching_rect" : [ 609.0, 68.0, 54.0, 20.0 ],
    "id" : "obj-31",
    "fontname" : "Arial",
    "fontsize" : 12.0,
    "numinlets" : 0
    }
    }
    ,                         {
    "box" :                             {
    "maxclass" : "newobj",
    "text" : "r samp5",
    "numoutlets" : 1,
    "outlettype" : [ "" ],
    "patching_rect" : [ 503.0, 68.0, 54.0, 20.0 ],
    "id" : "obj-30",
    "fontname" : "Arial",
    "fontsize" : 12.0,
    "numinlets" : 0
    }
    }
    ,                         {
    "box" :                             {
    "maxclass" : "newobj",
    "text" : "r samp4",
    "numoutlets" : 1,
    "outlettype" : [ "" ],
    "patching_rect" : [ 389.0, 68.0, 54.0, 20.0 ],
    "id" : "obj-29",
    "fontname" : "Arial",
    "fontsize" : 12.0,
    "numinlets" : 0
    }
    }
    ,                         {
    "box" :                             {
    "maxclass" : "newobj",
    "text" : "r samp3",
    "numoutlets" : 1,
    "outlettype" : [ "" ],
    "patching_rect" : [ 282.0, 68.0, 54.0, 20.0 ],
    "id" : "obj-28",
    "fontname" : "Arial",
    "fontsize" : 12.0,
    "numinlets" : 0
    }
    }
    ,                         {
    "box" :                             {
    "maxclass" : "newobj",
    "text" : "r samp2",
    "numoutlets" : 1,
    "outlettype" : [ "" ],
    "patching_rect" : [ 176.0, 68.0, 54.0, 20.0 ],
    "id" : "obj-27",
    "fontname" : "Arial",
    "fontsize" : 12.0,
    "numinlets" : 0
    }
    }
    ,                         {
    "box" :                             {
    "maxclass" : "newobj",
    "text" : "r samp1",
    "numoutlets" : 1,
    "outlettype" : [ "" ],
    "patching_rect" : [ 62.0, 68.0, 54.0, 20.0 ],
    "id" : "obj-26",
    "fontname" : "Arial",
    "fontsize" : 12.0,
    "numinlets" : 0
    }
    }
    ,                         {
    "box" :                             {
    "maxclass" : "message",
    "text" : "0, 2000 2000",
    "numoutlets" : 1,
    "outlettype" : [ "" ],
    "patching_rect" : [ 609.0, 152.0, 81.0, 18.0 ],
    "id" : "obj-14",
    "fontname" : "Arial",
    "fontsize" : 12.0,
    "numinlets" : 2
    }
    }
    ,                         {
    "box" :                             {
    "maxclass" : "newobj",
    "text" : "line~",
    "numoutlets" : 2,
    "outlettype" : [ "signal", "bang" ],
    "patching_rect" : [ 609.0, 198.0, 36.0, 20.0 ],
    "id" : "obj-16",
    "fontname" : "Arial",
    "fontsize" : 12.0,
    "numinlets" : 2
    }
    }
    ,                         {
    "box" :                             {
    "maxclass" : "newobj",
    "text" : "play~ sample6 2",
    "numoutlets" : 3,
    "outlettype" : [ "signal", "signal", "bang" ],
    "patching_rect" : [ 609.0, 279.0, 98.0, 20.0 ],
    "id" : "obj-17",
    "fontname" : "Arial",
    "fontsize" : 12.0,
    "numinlets" : 1
    }
    }
    ,                         {
    "box" :                             {
    "maxclass" : "message",
    "text" : "0, 2000 2000",
    "numoutlets" : 1,
    "outlettype" : [ "" ],
    "patching_rect" : [ 503.0, 152.0, 81.0, 18.0 ],
    "id" : "obj-18",
    "fontname" : "Arial",
    "fontsize" : 12.0,
    "numinlets" : 2
    }
    }
    ,                         {
    "box" :                             {
    "maxclass" : "newobj",
    "text" : "line~",
    "numoutlets" : 2,
    "outlettype" : [ "signal", "bang" ],
    "patching_rect" : [ 503.0, 198.0, 36.0, 20.0 ],
    "id" : "obj-20",
    "fontname" : "Arial",
    "fontsize" : 12.0,
    "numinlets" : 2
    }
    }
    ,                         {
    "box" :                             {
    "maxclass" : "newobj",
    "text" : "play~ sample5 2",
    "numoutlets" : 3,
    "outlettype" : [ "signal", "signal", "bang" ],
    "patching_rect" : [ 503.0, 279.0, 98.0, 20.0 ],
    "id" : "obj-21",
    "fontname" : "Arial",
    "fontsize" : 12.0,
    "numinlets" : 1
    }
    }
    ,                         {
    "box" :                             {
    "maxclass" : "message",
    "text" : "0, 2000 2000",
    "numoutlets" : 1,
    "outlettype" : [ "" ],
    "patching_rect" : [ 389.0, 152.0, 81.0, 18.0 ],
    "id" : "obj-22",
    "fontname" : "Arial",
    "fontsize" : 12.0,
    "numinlets" : 2
    }
    }
    ,                         {
    "box" :                             {
    "maxclass" : "newobj",
    "text" : "line~",
    "numoutlets" : 2,
    "outlettype" : [ "signal", "bang" ],
    "patching_rect" : [ 389.0, 198.0, 36.0, 20.0 ],
    "id" : "obj-24",
    "fontname" : "Arial",
    "fontsize" : 12.0,
    "numinlets" : 2