voice painting...

    May 23 2006 | 12:40 am
    was wondering if anyone would be interested in helping out with a patch i'm doing for a final college project..
    the idea is of a 'voice painting' installation, to translate a live audio input to a constantly evolving projected 'painting' using Jitter.. i have a patch set up at present where at a certain level of audio, a bang sends a 'point' message to the jit.gj.sketch object, and i'm hoping to use the frequency of the source signal to determine Y value of that point. I'm also deciding between the cross corrreltion of two microphones, or subsampling a live video stream to get a 'position sensing' X value.. the idea is then that the user or users can create their own painting that is constantly evolving (did i mention that i'd like each mark made on the screen to have a set lifespan, so everything is constantly fading as new marks are being made..)
    can anyone suggest a way to get a frequency output in numbers from an incoming signal, to be used as my 'Y value'? am also hoping to use the frequency to somehow determine colour, if anyone has any ideas..? also, after grayscaling & sub-sampling a live video stream to say 64x1 pixels, &then applying a threshold, how could i actually output, again in numbers, the X value position of the 'movement'..? &then there's the whole fading thing...
    any and all help would be really appreciated, thanking you,

    • May 23 2006 | 1:58 am
      snapshot~ can grab control rate data from audio rate data, that could be for your 'y' axis
      however, you might want to check out
      jit.gl.graph ? or jit.graph
      or use jit.poke~ and handle drawing yourself.
      theres a whole subset of audio -> matrix objects made to do this sort of stuff.
      good luck!
      v a d e //
      www.vade.info abstrakt.vade.info
    • May 23 2006 | 3:29 am
      thanks a million for the reply Vade, am looking into those now..
      i just went and saw that superDraw applet through your blog too, it's a very similar aesthetic to what i envision for my project, just that the different parameters as mentioned above would be the controlling aspect.. was your patch based on this (the Blackspiral Dance) a tough one to create with Jitter?
      again, thanks for the help,
    • May 23 2006 | 3:58 am
      the trick is getting the draw order correct, and the fact that screen2world and world2screen routines for jit.gl.render are only exposed through javascript.
      I use the below javascript in the patch instead of a patcher jit.gl.render, and a jit.window with mouseidle 1 (which enables the mouse coordinates in the window to be dumped out of the dumpout outlet, and then i pass the x/y to the screen2world function, and the output of the javascripts gives me the appropriate openGL coordinates, which then get passed to jit.gl.sketch.
      adding in a handle rotation in the mix, and handling things with automatic 0 gets you the patch.
      ill leave that to you. heres the JS, which is a simple modification posted by JKC in the archives;
      ------------- outlets = 2;
      var myRender = new JitterObject("jit.gl.render", "drawing"); // drawing is my render context/window name
      function anything() { // JKC's code //pass off all other messages to the wrapped Jitter Object var a = arrayfromargs(arguments);
      // detect if method or attribute and call method or set property accordingly // methods are instances of the function class, detected with the isPrototypeOf method if (Function.prototype.isPrototypeOf(myRender[messagename])) { myRender[messagename](a); } else { myRender[messagename] = a; } }
      function erase() { myRender.erase(); }
      function bang() { myRender.drawclients(); myRender.swap(); outlet(0, "bang"); }
      function screen2world(x,y) { outlet(1, myRender.screentoworld(x,y, 0.7)); }
      v a d e //
      www.vade.info abstrakt.vade.info
    • May 23 2006 | 2:04 pm
      thanks again Vade,
      have been trying to implement that JS that you put up, but having never tried that before i can't seem to get it to take. Should i insert the code into an empty object box, or straight onto the screen? or am i doing it completely wrong..? apologies for my ignorance...
      also, i've been reading up on an object called Fiddle~ for interpreting an incoming signal, that could help find my Y value, but the object as written above isn't recognized by Jitter. have you heard of this object before, or know how to implement it?
      many thanks,
    • May 23 2006 | 9:33 pm
      you need to save the file as some_name.js , put it in max's search path, and then make an object called some_name.js , which should load up the code in the file. Check out the tutorials on javascript in the docs.
      fiddle~ - yes. its an external. its fun, play with it and check out the help file, and check the archives.
      v a d e //
      www.vade.info abstrakt.vade.info