Working out Velocity with Kinect

TheJamsh's icon

So I'm working on a velocity-sensitive virtual percussion instrument powered by Max which uses the Kinect. Initially, I planned on using Wii remotes to determine velocities, but as they proved to be a royal pain to get working at all, I'm ditching them in favor of the Kinect.

I've seen plenty of posts around which give you the mathematical calculations to work out velocity from two given points in space over time, but how can I actually apply that in Max? Does anybody have some existing code that does something similar or even have a starting point?

At some stage I plan on converting these velocities and making the patch compatible with MIDI (once I have the velocity in Mp/s or whatever, that should be easy with the scale object), but I need to figure out where to start. Any help is appreciated!

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

Hi
here's a simple way to get delta, or rate of change data from a rising/falling number stream.

Sorry to hear you had to abandon the Wiimotes :(

TheJamsh's icon

You legend! That's perfect. In theory I should be able to feed that the Kinect numbers and it should work it out on the fly, without having to really store any values anywhere, perfect.

In regards to the Wii, It's okay really. I'm probably saving myself an awful lot of headaches, and with the patch you posted it almost seems easier to use the kinect anyway!