Forums > Jitter

Creating a square around the tracking point

March 27, 2014 | 10:08 am

Hey guys I am trying to create a patch that changes audio effects based upon movement of a tracking object (based upon X,Y positions).

My problem is i want to create a shape on screen which can be moved which is reliant on the tracked object.

Please help, been looking all over to try and figure this out!

Here is my code

– Pasted Max Patch, click to expand. –

March 27, 2014 | 11:17 am

the patch i just posted here should help you get started:

http://cycling74.com/forums/topic/rotate-shape-on-pivot/#post-285092


March 27, 2014 | 11:34 am

Thanks a lot, but a few items don’t seem to be working within the patch :(
zl.slice 2
jit.anim.drive @turn 0 0 1 @speed 100

Are they externals?


March 27, 2014 | 11:57 am

Ah think I will just give up, its due tomorrow and don’t think i can get my head round it, thanks for the help though :)


March 27, 2014 | 1:59 pm

those two objects are probably max 6 related, I’m guessing here that you’re on max 5?

You probably don’t need the jit.anim.drive, and zl.slice can be replaced with "zl slice 2" without the . in there, if I’m not mistaken?


March 27, 2014 | 2:45 pm

Will give it a try thanks

And yeah I have Max 5.1


March 27, 2014 | 2:56 pm

Here is my code with your patch implemented, but I’ve done it wrong some how. Kind of a beginner with Max and struggling hard! Would appreciate if someone could have a quit problem solve, think I have like a link not connected or something

<code>

– Pasted Max Patch, click to expand. –

</code>


March 28, 2014 | 12:44 am

i would use jit.lcd to draw the rect and then copy it into the matrix


Viewing 8 posts - 1 through 8 (of 8 total)