Randomly Generating X/Y Values as Triggers

Jay Ache's icon

Hello all,

I'm currently working on a project that allows me control of two pictslider objects using a homemade accelerometer controller. For a musical component, I want to plot a large number of randomly generated points across an x/y plane of the same dimensions (128 by 128), and any time one of those points is "scrolled over" with the matching numerical value, it will trigger a bang (the bang will be then used to cycle through a group of audio samples, creating a wind chime effect). Anyone ever try something like that here? Just looking for tips as I've kind of hit a wall.

Source Audio's icon

what are you exactly asking for ?
how to generate random values,
or how to ramp from value to value,
or how to bang when ramp ends ?

Jay Ache's icon

I’m asking for a few things I suppose. I want to generate a large number of x y coordinates, plot them on an x y graph, and any time the output from a pict slider matches one of these coordinates, generate a bang

Source Audio's icon

why this complication with plot graph etc ?

you can generate as many xy pairs and store them into coll for example
and trigger bang whenever both axis match

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

-----
But if you need some visual graphs etc, that is out of my interest

Jay Ache's icon

Thank you!! This is exactly what I was looking for. Going to search for some advice on the visual component. Much appreciated