Why Jit.gen acting strange?


    Sep 25 2012 | 12:54 pm
    Sample in 3D mode gives unexpected results. Is this a bug?

    • Sep 25 2012 | 12:56 pm
      { "patcher" : { "fileversion" : 1, "appversion" : { "major" : 6, "minor" : 0, "revision" : 7 } , "rect" : [ 419.0, 40.0, 640.0, 480.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" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-12", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 2, "outlettype" : [ "jit_matrix", "" ], "patching_rect" : [ 239.0, 99.0, 217.0, 20.0 ], "text" : "jit.expr @expr norm[0] norm[1] norm[2]" }
      } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-27", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "jit_matrix", "" ], "patcher" : { "fileversion" : 1, "appversion" : { "major" : 6, "minor" : 0, "revision" : 7 } , "rect" : [ -165.0, 194.0, 600.0, 450.0 ], "bgcolor" : [ 0.9, 0.9, 0.9, 1.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" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-3", "maxclass" : "newobj", "numinlets" : 0, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 255.0, 39.0, 38.0, 20.0 ], "text" : "norm" }
      } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-2", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 183.0, 91.0, 49.0, 20.0 ], "text" : "sample" }
      } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-1", "maxclass" : "newobj", "numinlets" : 0, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 183.0, 39.0, 30.0, 20.0 ], "text" : "in 1" }
      } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-4", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 183.0, 142.0, 37.0, 20.0 ], "text" : "out 1" }
      } ], "lines" : [ { "patchline" : { "destination" : [ "obj-2", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-1", 0 ] }
      } , { "patchline" : { "destination" : [ "obj-4", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-2", 0 ] }
      } , { "patchline" : { "destination" : [ "obj-2", 1 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-3", 0 ] }
      } ] } , "patching_rect" : [ 239.0, 134.0, 46.0, 20.0 ], "text" : "jit.gen" }
      } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-19", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 2, "outlettype" : [ "jit_matrix", "" ], "patching_rect" : [ 239.0, 173.0, 92.0, 20.0 ], "text" : "jit.!pass @val 1" }
      } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-18", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 2, "outlettype" : [ "jit_matrix", "" ], "patching_rect" : [ 239.0, 200.0, 119.0, 20.0 ], "text" : "jit.pack 2 @jump 1 3" }
      } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-15", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "jit_matrix", "" ], "patching_rect" : [ 239.0, 228.0, 74.0, 20.0 ], "text" : "jit.gl.volume" }
      } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-11", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "jit_matrix", "" ], "patching_rect" : [ 239.0, 65.0, 155.0, 20.0 ], "text" : "jit.matrix 3 float32 20 20 20" }
      } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-8", "maxclass" : "flonum", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "float", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 73.5, 26.0, 50.0, 20.0 ] }
      } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-7", "maxclass" : "jit.fpsgui", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "", "" ], "patching_rect" : [ 36.0, 157.0, 80.0, 36.0 ] }
      } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-6", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "bang" ], "patching_rect" : [ 36.0, 56.0, 63.0, 20.0 ], "text" : "qmetro 30" }
      } , { "box" : { "id" : "obj-4", "maxclass" : "toggle", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "int" ], "parameter_enable" : 0, "patching_rect" : [ 36.0, 26.0, 20.0, 20.0 ] }
      } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-5", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "bang", "erase" ], "patching_rect" : [ 36.0, 89.0, 57.0, 20.0 ], "text" : "t b erase" }
      } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-3", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "", "" ], "patching_rect" : [ 36.0, 223.0, 71.0, 20.0 ], "text" : "jit.gl.handle" }
      } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-2", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "bang", "" ], "patching_rect" : [ 36.0, 126.0, 163.0, 20.0 ], "text" : "jit.gl.render @camera -2 2 -3" }
      } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-1", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "bang", "" ], "patching_rect" : [ 36.0, 259.0, 63.0, 20.0 ], "text" : "jit.window" }
      } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-10", "maxclass" : "message", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 73.5, 199.0, 37.0, 18.0 ], "text" : "reset" }
      } , { "box" : { "attr" : "camera", "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-16", "maxclass" : "attrui", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 36.0, 286.0, 206.0, 20.0 ] }
      } ], "lines" : [ { "patchline" : { "destination" : [ "obj-3", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-10", 0 ] }
      } , { "patchline" : { "destination" : [ "obj-12", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-11", 0 ] }
      } , { "patchline" : { "destination" : [ "obj-27", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-12", 0 ] }
      } , { "patchline" : { "destination" : [ "obj-2", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-16", 0 ] }
      } , { "patchline" : { "destination" : [ "obj-15", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-18", 0 ] }
      } , { "patchline" : { "destination" : [ "obj-18", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-19", 0 ] }
      } , { "patchline" : { "destination" : [ "obj-7", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-2", 0 ] }
      } , { "patchline" : { "destination" : [ "obj-18", 1 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-27", 0 ] }
      } , { "patchline" : { "destination" : [ "obj-19", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-27", 0 ] }
      } , { "patchline" : { "destination" : [ "obj-2", 0 ], "disabled" : 0, "hidden" : 0, "midpoints" : [ 45.5, 250.0, 32.75, 250.0, 32.75, 116.0, 45.5, 116.0 ], "source" : [ "obj-3", 0 ] }
      } , { "patchline" : { "destination" : [ "obj-6", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-4", 0 ] }
      } , { "patchline" : { "destination" : [ "obj-2", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-5", 1 ] }
      } , { "patchline" : { "destination" : [ "obj-2", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-5", 0 ] }
      } , { "patchline" : { "destination" : [ "obj-11", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-6", 0 ] }
      } , { "patchline" : { "destination" : [ "obj-5", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-6", 0 ] }
      } , { "patchline" : { "destination" : [ "obj-6", 1 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-8", 0 ] }
      } ], "dependency_cache" : [ { "name" : "attrui.mxe", "type" : "iLaF" } , { "name" : "jit.!pass.mxe", "type" : "iLaF" } ] }
      }
    • Oct 01 2012 | 5:15 am
      Hi there,
      This has been ticketed internally as #3601, and is being looked into.
      Thanks!
    • Jan 17 2014 | 9:19 pm
      has this been fixed? It also seems to me I am getting strange results from sample in hit.gen when I try to sample a nxnxn matrix and index it with a matrix of 3 float32 10 10 g
    • Jan 31 2014 | 1:37 am
      3D sampling should work. Could you post an example patch?
    • Jan 31 2014 | 3:15 pm
      My mistake. This is also due to input matrices to jit.gen needing to be the same size https://cycling74.com/forums/how-to-efficiently-sample-a-volume-matrix/