Working out Velocity with Kinect
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!
here’s a simple way to get delta, or rate of change data from a rising/falling number stream.
----------begin_max5_patcher---------- 696.3ocyX1saaCBFF93TodOf3vozLiAamry10wzTEwgjRmM1BvYYqZ26iehy RR6Vws1ncPhEeled4IuvGjmt8lYv0MGXJH3Sfu.lM6ISjYtX1Hy5CLCVSOTV QUtJBKapqYBMb9wWpYGztWHX6nZ9dFXOspio.0Lp.PARthK1ATZIiVepUUbA qroS3ZZZezsMBsh+SlMHJcQRebQWcSmthocR3T3Vpt7ASmeujUp8yBT1hr4. xpbSiMERrOvjEIfud9XHn0tw.9YImVcRT7MtfMqe7NTwonak6V6F1KzCWzKG jK3ut8F6Syi4ueTp5VqkzRMnrSJM0viTvVYSMnUx1ya5TSOJIYV5kRHuWVRh .KEruaFqmixOXl8EKfCCKn+EVRxsVL7RrkGjTGiRNmJ9NR+iVluEvsUMTSqG J1RguHiRGcF8wwmQEVrT3rLDzzgHTrPjcQlw0NPFkFfOJaoCR4A.I3bymAyn jWlQ3QmQszxuA1BxRlfUaXmIJaUHTZnDZ0XahpYJEcG64DJYLWjk42.J24b7 6NiVNtjYYrVdQWq.iJbRSHtCBfbzgfmrsfJfibhr3Xd54yT5dxik64tw06bL 6UpemYbpETSh2gDK.0xaYi89xEdKiy4jQBfQCFO3XgGsIq01QM0tGN3jAZfl +VcRoi8tPpJ9FlD9VyJk59FgvtiGiKB0XzRkl4plIumInqqXWbGkyOTSXyWe G6N7102x0Ic6KthBplNYYuxNhV.5OJbCSo4ByEcaDmUIxkU5A9lMLwEheCWY mPtoPxe+mkAIqjWSV3KqTDjENDYQhtrPAgqh+S00xn6trWZ30000pOBBqHDc kGcdsJHbkDcbQBQWqhusGEhthu6JHYcs3GntNlSh11tmIUG6ZujLoferQZKm O2WlK7k88Lz9W+02jBSDWuZ952PSwZL4 -----------end_max5_patcher-----------
Sorry to hear you had to abandon the Wiimotes :(
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!