Help needed for Jitter audiovisual patch

    May 29 2013 | 3:25 pm
    Hi there,
    I am quite new to Jitter and have been struggling with trial and error. I have created a OpenGL cube that reacts to live audio by stretching and distorting. I am trying to troubleshoot the fact that my shape has now disappeared or become transparent in my jit.window. It was working fine until I made some changes to the color in my object, but I am not positive that is why the shape is no longer visible.
    If someone could have a look at my patch and let me know where I’ve gone wrong — I would be extremely grateful.
    Once things are functioning properly again, I have another question, and that is: how might I make the cube’s position (or depth) change in relation to the live audio? Do I use prepend in the same way I did for the scale of my shape?
    Thank you in advance for any help or advice!
    I have attached a compressed .zip file with my patch and subpatcher files.

    • May 29 2013 | 3:55 pm
      On my computer your patch is working perfectly. I see the cube ;-). But you have to click on ezadac~ icon after loading the patch.
    • May 29 2013 | 4:00 pm
      Try attached patch (it's nearly whole your's, I just added [loadbang]'s for automatisation).
    • May 29 2013 | 4:09 pm
      Thank you so much, Yaniki! I really appreciate your help! I overlooked that loadbang automization bit — that’s really important.
      Do you know of a way to control depth or position of the shape? Again, thank you for everything :)
    • May 29 2013 | 4:49 pm
      If that is too broad of a question, no worries. I am exploring other options now.
    • May 29 2013 | 4:56 pm
      I think maybe I've misunderstood your question, because the answer is right there in your patch? Apologies if I'm confused and explaining something you know.
      Send the gridshape messages similar to what the "position" attrui is displaying (i.e. feed a "position 0. 0. $1" message with a float into the gridshape to have the Z placement of the cube jump).
      Alternatively, you can produce similar results by feeing the render object "camera 0. 0. $1" messages. The results would be the same for this patch, but if you add more objects the "camera" option would affect all of them, whereas "position" would be the particular gridshape only.
    • May 29 2013 | 9:30 pm
      You want to move position of the camera to see full box? The "camera" property of [] will be good for you. See attached patch.
    • May 29 2013 | 9:47 pm
      And one more think: if you want to load your subpatch from external file in your patch use [cube] instead of [p cube]. I also added simple animation smoother to the box. Again, check attached patch.
    • May 29 2013 | 9:52 pm
      .. sorry, I missed something in previous patch (but I'm trying to patching and play with cats in the same time)... this one will be better...
    • May 30 2013 | 3:30 am
      Yaniki — I cannot thank you enough. You have helped me out tremendously! I appreciate your time and consideration. Cats obviously take priority over patches.
      And thanks for the tip Nnneuromodulator, I am relatively new to Jitter, so I tend to miss certain logical solutions. A little hint goes a long way!
    • May 30 2013 | 4:42 am
      I'm pretty new to it too. Doing the same "stumbling around" thing. I'm getting kind of obsessed, though. :)
    • May 30 2013 | 6:58 am
      Still don't see the cube, even in the latest mod patch. OSX 10.8.3, max 6.1.2.
    • May 30 2013 | 10:16 am
      @SASHARAE: Pleasure is mine. I'm glad that was helpful and I'm keeping fingers crossed for your future projects.
      @STEPHANE MORISSE: Your hardware and software are exactly like mine own... try change camera distance (to -5.0). Also, 'cause size of the cube depends on audio be sure audio processing in Max is "on" and internal microphone is used as input device.
    • May 30 2013 | 2:27 pm
      @yaniki and @stephane morisse, my friend had the same issue when she tried to look at it on her computer. I have a feeling that @yaniki is right about getting the audio and video configured appropriately.
    • May 30 2013 | 4:32 pm
      Tomorrow I have some things to do with MaxMSP in art center I'm networked with. So I can check how the patch behave. It's actually interesting for me, 'cause a lot of my patches should work on different machines.
      Tomorrow I'll let you know...
    • May 30 2013 | 5:46 pm
      Anyway: I ordered the patch a bit to be sure, that there is no hidden bug in it (ordered patch is, of course, attached, to the post). In my opinion everything is correct and patch (ordered or not) should work on every compatible with Max machine (with guid-in camera and microphone).
      I added also alternative audio and video sources for deeper testing – nothing special, just useful things.
    • May 30 2013 | 6:09 pm
      Thanks once again @Yaniki — you have gone above and beyond. It looks like a very reliable patch now.
      I have one more question, you can take it or leave it... I am trying to find a way of changing the color of my shape (in response to live audio) — and I feel like I am close to understanding the answer with the help that was given in this thread on rgb control via sound: I know the answer is in Shantii’s post (from the pic posted), but all of my attempts to integrate this idea are failing.
    • May 30 2013 | 7:29 pm
      This method should work, but you can try something different. Of course everything depends on the effect you want to create and you can make really tons of solutions... but you can use e.g. [scale] objects to transform gain of the audio input into combination of RGB values (see attached patch). More exiting effects you can derive from FFT transformation, but it's a bit more complex.
    • May 31 2013 | 8:11 am
      FWIW, version 2.2, still don't see the cube... Don't really have time to investigate why now but it's weird...Played with the scale and camera settings with no success.
    • May 31 2013 | 8:33 am
      OK, here's something weirder... Played in version 2 with jit.window erase color and I could see the cube but no texture. In version 3, same until I erased the size attribute in jit.window to type 320 240 (the attrui changed the size but nothing else) : since then I see the cube AND the texture. So I got back to V2 and did the same (changing the size of jit.window) but it doesn't work... Looks like a strange bug.
    • May 31 2013 | 8:35 am
      Hi Guys
      I think, I hunted the issue... there was an additional parameter in [].
      In previous version renderer was declared like that:
      [jit.window moonPie ctx @size 640 480]
      and, in this case, "ctx" string is just unnecessary, correct syntax is:
      [jit.window moonPie @size 640 480]
      Hope, this solve the problem...
    • May 31 2013 | 8:46 am
      Yep. Hadn't noticed that the name of the context was different for jit.window. Probably worked after I changed the size because of the new system of not being forced to name the context in max 6. I had tried the previous modified version in max 5 and it didn't work, certainly because in V5 you had to name the context explicitly.
    • May 31 2013 | 8:46 am
      And finally a few minor fixes in "cube" subpatcher...
    • Jun 21 2013 | 2:34 pm
      Wow, @Yaniki, you definitely evolved that patch into something pretty amazing. Thanks once again. Hopefully you can do something with it too in the future!