Freezing then converting audio signal to float to modify Max variables


    Jun 10 2013 | 7:36 am
    Hello!
    I have a task to put some audio signal to modify the delay length. The point of this is to change the "length" of the Karplus-Strong "string", depending on the value of the signal output. If you have been dealing with the waveguide algorithms, then you know what is it for(a lot better than me).
    I'm trying to do this as on attached picture(as you can see snapshot~ time resolution is set to 1 sample, which is probably too much for Max object), but it's freezing application. How would you suggest to accomplish this without freezing?
    ----------begin_max5_patcher----------
    {
    "boxes" : [ {
    "box" : {
    "maxclass" : "ezdac~",
    "numoutlets" : 0,
    "patching_rect" : [ 453.0, 495.0, 45.0, 45.0 ],
    "id" : "obj-21",
    "numinlets" : 2
    }
    }
    , {
    "box" : {
    "maxclass" : "flonum",
    "fontsize" : 12.0,
    "numoutlets" : 2,
    "patching_rect" : [ 604.0, 254.0, 50.0, 20.0 ],
    "outlettype" : [ "float", "bang" ],
    "fontname" : "Arial",
    "id" : "obj-19",
    "numinlets" : 1
    }
    }
    , {
    "box" : {
    "maxclass" : "flonum",
    "fontsize" : 12.0,
    "numoutlets" : 2,
    "patching_rect" : [ 619.0, 449.0, 50.0, 20.0 ],
    "outlettype" : [ "float", "bang" ],
    "fontname" : "Arial",
    "id" : "obj-17",
    "numinlets" : 1
    }
    }
    , {
    "box" : {
    "maxclass" : "newobj",
    "text" : "+~",
    "fontsize" : 12.0,
    "numoutlets" : 1,
    "patching_rect" : [ 602.0, 315.0, 32.5, 20.0 ],
    "outlettype" : [ "signal" ],
    "fontname" : "Arial",
    "id" : "obj-6",
    "numinlets" : 2
    }
    }
    , {
    "box" : {
    "maxclass" : "newobj",
    "text" : "*~ 0.01",
    "fontsize" : 12.0,
    "numoutlets" : 1,
    "patching_rect" : [ 511.0, 282.0, 49.0, 20.0 ],
    "outlettype" : [ "signal" ],
    "fontname" : "Arial",
    "id" : "obj-2",
    "numinlets" : 2
    }
    }
    , {
    "box" : {
    "maxclass" : "message",
    "text" : "1 samples",
    "fontsize" : 12.0,
    "numoutlets" : 1,
    "patching_rect" : [ 661.818176, 345.545441, 66.0, 18.0 ],
    "outlettype" : [ "" ],
    "fontname" : "Arial",
    "id" : "obj-8",
    "numinlets" : 2
    }
    }
    , {
    "box" : {
    "maxclass" : "newobj",
    "text" : "snapshot~",
    "fontsize" : 12.0,
    "numoutlets" : 1,
    "patching_rect" : [ 621.54541, 397.818176, 66.0, 20.0 ],
    "outlettype" : [ "float" ],
    "fontname" : "Arial",
    "id" : "obj-1",
    "numinlets" : 2
    }
    }
    , {
    "box" : {
    "maxclass" : "newobj",
    "text" : "!/ 1000.",
    "fontsize" : 10.0,
    "numoutlets" : 1,
    "patching_rect" : [ 599.454529, 212.180466, 44.0, 18.0 ],
    "outlettype" : [ "float" ],
    "fontname" : "Arial Bold",
    "id" : "obj-12",
    "numinlets" : 2
    }
    }
    , {
    "box" : {
    "maxclass" : "flonum",
    "fontsize" : 10.0,
    "numoutlets" : 2,
    "patching_rect" : [ 583.454529, 168.045456, 50.0, 18.0 ],
    "outlettype" : [ "float", "bang" ],
    "fontname" : "Arial Bold",
    "id" : "obj-16",
    "numinlets" : 1
    }
    }
    , {
    "box" : {
    "maxclass" : "newobj",
    "text" : "*~ 0.99",
    "fontsize" : 10.0,
    "numoutlets" : 1,
    "patching_rect" : [ 474.85965, 366.632507, 42.0, 18.0 ],
    "outlettype" : [ "signal" ],
    "fontname" : "Arial Bold",
    "id" : "obj-13",
    "numinlets" : 2
    }
    }
    , {
    "box" : {
    "maxclass" : "newobj",
    "text" : "tapout~ 10",
    "fontsize" : 10.0,
    "numoutlets" : 1,
    "patching_rect" : [ 491.09256, 249.495712, 61.0, 18.0 ],
    "outlettype" : [ "signal" ],
    "fontname" : "Arial Bold",
    "id" : "obj-11",
    "numinlets" : 1
    }
    }
    , {
    "box" : {
    "maxclass" : "newobj",
    "text" : "tapin~",
    "fontsize" : 10.0,
    "numoutlets" : 1,
    "patching_rect" : [ 482.859589, 216.716385, 40.0, 18.0 ],
    "outlettype" : [ "tapconnect" ],
    "fontname" : "Arial Bold",
    "id" : "obj-10",
    "numinlets" : 1
    }
    }
    , {
    "box" : {
    "maxclass" : "message",
    "text" : "maxsustain 10",
    "fontsize" : 10.0,
    "numoutlets" : 1,
    "patching_rect" : [ 223.454544, 130.686539, 79.0, 16.0 ],
    "outlettype" : [ "" ],
    "fontname" : "Arial Bold",
    "id" : "obj-9",
    "numinlets" : 2
    }
    }
    , {
    "box" : {
    "maxclass" : "message",
    "text" : "1",
    "fontsize" : 10.0,
    "numoutlets" : 1,
    "patching_rect" : [ 181.954544, 130.686539, 32.5, 16.0 ],
    "outlettype" : [ "" ],
    "fontname" : "Arial Bold",
    "id" : "obj-7",
    "numinlets" : 2
    }
    }
    , {
    "box" : {
    "maxclass" : "newobj",
    "text" : "*~",
    "fontsize" : 10.0,
    "numoutlets" : 1,
    "patching_rect" : [ 229.223526, 239.304855, 32.5, 18.0 ],
    "outlettype" : [ "signal" ],
    "fontname" : "Arial Bold",
    "id" : "obj-5",
    "numinlets" : 2
    }
    }
    , {
    "box" : {
    "maxclass" : "newobj",
    "text" : "adsr~ 1 0 1. 1",
    "fontsize" : 10.0,
    "numoutlets" : 4,
    "patching_rect" : [ 208.954544, 161.690079, 74.0, 18.0 ],
    "outlettype" : [ "signal", "signal", "", "" ],
    "fontname" : "Arial Bold",
    "id" : "obj-4",
    "numinlets" : 5
    }
    }
    , {
    "box" : {
    "maxclass" : "newobj",
    "text" : "noise~",
    "fontsize" : 10.0,
    "numoutlets" : 1,
    "patching_rect" : [ 206.223526, 202.690079, 42.0, 18.0 ],
    "outlettype" : [ "signal" ],
    "fontname" : "Arial Bold",
    "id" : "obj-3",
    "numinlets" : 1
    }
    }
    ],
    "lines" : [ {
    "patchline" : {
    "source" : [ "obj-17", 0 ],
    "destination" : [ "obj-11", 0 ],
    "hidden" : 0,
    "midpoints" : [ ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-11", 0 ],
    "destination" : [ "obj-21", 1 ],
    "hidden" : 0,
    "midpoints" : [ ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-11", 0 ],
    "destination" : [ "obj-21", 0 ],
    "hidden" : 0,
    "midpoints" : [ ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-19", 0 ],
    "destination" : [ "obj-6", 1 ],
    "hidden" : 0,
    "midpoints" : [ ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-12", 0 ],
    "destination" : [ "obj-19", 0 ],
    "hidden" : 0,
    "midpoints" : [ ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-1", 0 ],
    "destination" : [ "obj-17", 0 ],
    "hidden" : 0,
    "midpoints" : [ ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-6", 0 ],
    "destination" : [ "obj-1", 0 ],
    "hidden" : 0,
    "midpoints" : [ ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-2", 0 ],
    "destination" : [ "obj-6", 0 ],
    "hidden" : 0,
    "midpoints" : [ ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-11", 0 ],
    "destination" : [ "obj-2", 0 ],
    "hidden" : 0,
    "midpoints" : [ ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-7", 0 ],
    "destination" : [ "obj-9", 0 ],
    "hidden" : 0,
    "midpoints" : [ 191.454544, 155.686539, 171.204544, 155.686539, 171.204544, 123.686539, 232.954544, 123.686539 ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-13", 0 ],
    "destination" : [ "obj-10", 0 ],
    "hidden" : 0,
    "midpoints" : [ 484.35965, 351.632507, 453.777649, 351.632507, 453.777649, 198.520218, 492.359589, 198.520218 ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-11", 0 ],
    "destination" : [ "obj-13", 0 ],
    "hidden" : 0,
    "midpoints" : [ ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-16", 0 ],
    "destination" : [ "obj-12", 0 ],
    "hidden" : 0,
    "midpoints" : [ ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-10", 0 ],
    "destination" : [ "obj-11", 0 ],
    "hidden" : 0,
    "midpoints" : [ ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-3", 0 ],
    "destination" : [ "obj-5", 0 ],
    "hidden" : 0,
    "midpoints" : [ 215.723526, 230.045456, 238.723526, 230.045456 ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-4", 0 ],
    "destination" : [ "obj-5", 1 ],
    "hidden" : 0,
    "midpoints" : [ 218.454544, 194.045456, 252.223526, 194.045456 ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-5", 0 ],
    "destination" : [ "obj-10", 0 ],
    "hidden" : 0,
    "color" : [ 0.023529, 0.815686, 0.941176, 1.0 ],
    "midpoints" : [ 238.723526, 256.045471, 273.454529, 256.045471, 273.454529, 208.045456, 492.359589, 208.045456 ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-7", 0 ],
    "destination" : [ "obj-4", 0 ],
    "hidden" : 0,
    "midpoints" : [ 191.454544, 153.688309, 218.454544, 153.688309 ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-9", 0 ],
    "destination" : [ "obj-4", 0 ],
    "hidden" : 0,
    "midpoints" : [ 232.954544, 153.045456, 218.454544, 153.045456 ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-8", 0 ],
    "destination" : [ "obj-1", 1 ],
    "hidden" : 0,
    "midpoints" : [ ]
    }
    }
    ]
    }
    -----------end_max5_patcher-----------

    • Jun 14 2013 | 10:30 am
      bump
    • Jun 14 2013 | 1:15 pm
      Don't know for your topic but I've already used snapshot~ 1. without problem.
    • Jun 14 2013 | 4:12 pm
      You're going to want to do this with gen~.