Creating a loop

Continuing with Max/MSP part of my project, my next goal was creating a loop with specific positions and timings of my png sequence. I was already able to move the png sequence where i want on the plane, but this time i had to go in a more organizing way otherwise it was getting complicated. First, i decided on the steps:

– stay in the initial position (-0.8 , 0) for 3 seconds,

– then move to point(0,0) in 3 seconds,

– stay there for 2 seconds,

– move to point (o, 0.3) in 5 seconds,

– after 4 seconds, flip in 1 second,

– go to the beginning.

To create these steps, i split my events into patcher objects to organize them. So this is how it looks like :

Screen Shot 2013-03-19 at 5.07.41 PM

 

 

In p event1, i just defined the initial position of the png. With the delay object, it stays at (-0.8 , 0) for 3 seconds. ‘s trigger1’ sends a trigger message without patch cords. Below, it’s how it looks like:

event1

 

In p event2, ‘r trigger1’ receives the trigger message from the previous event and starts the second event which moves the png to (0,0) in 3 seconds. ‘Sel’ object pics 0 value, so when the png is at (0,0), it will stay there for 2 seconds and then activate ‘s trigger2’ to start the last event.

event2

 

In p event3 below, the png moves from (0,0) to (0, 0.3) in 5 seconds. After 4 seconds delay, it flips in 1 second. In the message that i am sending to the line object to send to ‘prepend scale’, changing the second value into a minus value changes its direction. Finally, sending these to ‘s trigger3’ finishes the loop. By adding a ‘r trigger3’ into the beginning of the first event turns this into a loop.

event3

 

With this exercise that i have tried with only one animation, now i can try to add more events and move my other sea animals the way i want by changing the coordination values.

Leave a Reply