Motion tracking - How do you use jit.findbounds?

SoundMonkey's icon

Hi,
I am planning on building an audio visual interface like the reactable. I want to use two types of blocks. Blocks with fiducials which activate music samples and colour blocks which when placed within a certain distance of a fiducial block will apply an audio effect to the sound block.

I can locate the position of any fiducial, and using jit.findbounds I can find the position of a colour. But how do I tell a sound block that when it is a certain distance away from a colour block to send a bang?

I hope this is clear enough.
Thanks SoundMonkey

MIB's icon
Max Patch
Copy patch and select New From Clipboard in Max.

try this. It's a bit messy, didn't have time to clean it up. but it calculates the distance between the rects given their center positions...
let me know if this helps...

SoundMonkey's icon

This is what I was looking for thanks.