X/Y Tracking Triggering Samples

Dave Rose's icon

Hi

I am currently working on a patch that involves tracking different colours snooker balls on a snooker table and trigger different colours snooker balls on a table. I have managed to get my patch to track colour, however i am unable to use the x/y values to trigger samples. I have read through tutorial 25 and this has information on Midi Notes and MSP/Tones but nothing about samples. I was wondering if anyone had any ideas how to go about this or has done a similar project in the past.

Thanks
Dave

llumen's icon

idea using [nodes].

Max Patch
Copy patch and select New From Clipboard in Max.

when your cursor (x/y position) enters a zone (described by a node) you get a logical transition, which can act as a trigger for samples and whatnot using for example an [adsr]

Dave Rose's icon

Thanks a lot for your help I have looked into nodes but i have been unsuccessful in getting the x/y data into the node I have posted my patch below if you have any more advice on how to resolve the problem.

Max Patch
Copy patch and select New From Clipboard in Max.

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

just divide the output of your PictSlider by 127 (range of the slider)
The use of nodes is just illustrative, what you could do is calculate the (euclidean) distance form each ball to a zone with a sample and then when it is within a certain range trigger something, this way you can disregard nodes, although the application would be similar to that of nodes