Help needed for Jitter audiovisual patch

May 29, 2013 at 8:25am

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.

#251104
May 29, 2013 at 8:55am

On my computer your patch is working perfectly. I see the cube ;-). But you have to click on ezadac~ icon after loading the patch.

#251106
May 29, 2013 at 9:00am

Try attached patch (it’s nearly whole your’s, I just added [loadbang]‘s for automatisation).

#251107
May 29, 2013 at 9:09am

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 :)

#251109
May 29, 2013 at 9:49am

If that is too broad of a question, no worries. I am exploring other options now.

#251110
May 29, 2013 at 9:56am

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.

#251111
May 29, 2013 at 2:30pm

Sasharae

You want to move position of the camera to see full box? The “camera” property of [jit.gl.render] will be good for you. See attached patch.

#251139
May 29, 2013 at 2:47pm

Sasharae

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.

#251141
May 29, 2013 at 2:52pm

.. 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…

#251143
May 29, 2013 at 8:30pm

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!

#251163
May 29, 2013 at 9:42pm

I’m pretty new to it too. Doing the same “stumbling around” thing. I’m getting kind of obsessed, though. :)

#251164
May 29, 2013 at 11:58pm

Still don’t see the cube, even in the latest mod patch. OSX 10.8.3, max 6.1.2.

#251166
May 30, 2013 at 3:16am

@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.

#251188
May 30, 2013 at 7:27am

@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.

#251214
May 30, 2013 at 9:32am

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…

#251235
May 30, 2013 at 10:46am

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.

#251249
May 30, 2013 at 11:09am

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: http://cycling74.com/forums/topic/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.

#251253
May 30, 2013 at 12:29pm

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.

#251257
May 31, 2013 at 1:11am

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.

#251280
May 31, 2013 at 1:33am

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.

#251282
May 31, 2013 at 1:35am

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…

#251283
May 31, 2013 at 1:46am

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.

#251285
May 31, 2013 at 1:46am

And finally a few minor fixes in “cube” subpatcher…

#251286
Jun 21, 2013 at 7:34am

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!

#253553

You must be logged in to reply to this topic.