Help creating a ripple with nodes that bang and reflect

Thomas Saunter's icon

So I've started experimenting in maxmsp and I'm trying to create something,

I've started with this tutorial:

I've got a 2D ripple that works but I want to create 4 "nodes" that would bang and output velocity corresponding with the ripples intensity. AND if possible interact with the ripple but that's extra.

Is this possible and can anyone point me in the right direction?

TFL's icon

Turns out there was this post a month ago, and I ended up reproducing the patch from that same video you posted.

If by "nodes" you mean cells from which you want to get the value of, you can simply use the getcell message to be send to the jit.matrix storing you ripple velocities.

If by 'interact with the ripple" you mean "creating drops using the mouse" then you can use a jit.pwindow which can both give a representation of the ripples, and output from its right outlet the mouse coordinates when you click on it. Then it is a matter of a bit math to retrieve which cell from your simulation matrix you actually clicked, and feed it with a setcell message.

All of that is in here:

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

Thomas Saunter's icon

Woah awesome, this is super close to what I was trying to do.

What are the cell values representing? Amplitude?

I was thinking of the nodes as more like posts that would obstruct the ripple and would also retrieve the cell values like you have already - so I can use the values to trigger a midi instrument. Is that possible in jitter?

TFL's icon

Yes, the cell values represent the amplitude at the current point, 0. being no perturbation. Maybe "water level" is a more accurate representation than "amplitude" in this context. Using these values to control MIDI stuff is mostly a story of scaling them to the usual 0 127 range. a [scale -0.5 0.5 0 127] should be a good starting point:


Thomas Saunter's icon

Thanks for your help, I'll have a play around and see if I can get something good out of this.