Changing the animation

So far, i had only worked with one png sequence, but what i need to do is to be able to change into another png sequence when the coordinations of the hand is on the png. I was already able to recieve the hand coordinations through synapse with Kinect, and also i was able to compare the kinect coordinations with png coordinations. If the coordinations are the same, i was receiving ‘1’ value. So, i should use this value to trigger the second png sequence and activate the sound which will give the information about animals. So far i could only manage to achieve the changing part. I will look for the sound part next week.

Below it is how my pngreader patcher looked like with one png sequence:

pngreader1

And here below it is how it looks like with 2 png sequences:

 

pngreader2

 

To work with two png sequences, all the frames of them and the max/msp file have to be in the same folder. The number object which connects to the gate defines whether it is going to work the first sequence or the second sequence. With ‘receive compareStatus’ object, i am receiving the comparison of kinect coordinations and png sequence’s coordinations. It can only be 0 or 1. So if it is a 0 it means the hand is not on the png, by adding it a +1, it will reach to the value 1 which will work the first png sequence. If the hand is on the png, compareStatus will give a 1 value, so by adding a +1 to it, it will reach to the value 2. This 2 value will work the second png through gate.

The only problem in this system is that, i can only display the 2nd png sequence when the hand is on the png. However, i need it to stay in the second png after the hand has been on the png once. So i need some kind of a ‘lock’ that will help me.

So a ‘sel’ object and another ‘gate’ helped me to solve this problem. Below is how it looks:

solution

Leave a Reply