Help needed for Jitter audiovisual patch
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 jit.gl.gridshape 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.
On my computer your patch is working perfectly. I see the cube ;-). But you have to click on ezadac~ icon after loading the patch.
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 :)
If that is too broad of a question, no worries. I am exploring other options now.
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.
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!
I'm pretty new to it too. Doing the same "stumbling around" thing. I'm getting kind of obsessed, though. :)
Still don't see the cube, even in the latest mod patch. OSX 10.8.3, max 6.1.2.
@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.
@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.
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...
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.
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: https://cycling74.com/forums/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.
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.
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.
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.
Hi Guys
I think, I hunted the issue... there was an additional parameter in [jit.gl.render].
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...
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.
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!