Goals
Create a composition that expresses an interaction between two good old friends
Outcomes
The robot on the left is shaking and sick, so its range of motion is more limited, and its movement is less smooth. The robot on the right is concerned about its friend on the left.
We separated the poses for each robot by splicing the pose array. This allowed each of us to control our own robot. We also remapped the midi buttons such that the left half would control the left robot and the right half would control the right robot.
Video documentation
Code exercise4.poses reset,0,0 pose1,290,0 pose2,-193,0 pose3,0,775 pose4,194,775 pose5,480,775 pose6,96,-484 pose7,387,-387 exercise4.py def set_pose(self, name, robot): position = self.poses.get(name) if position is not None: if robot == 1: print("sending robot 0 to position {}".format(position[0:2])) self.set_target(0, position[0]) self.set_target(1, position[1]) elif robot == 0: position = [-p for p in position] print("sending robot 1 to position {} (opposite)".format(position[0:2])) self.set_target(2, position[0]) self.set_target(3, position[1]) def note_on(self, channel, key, velocity): ..... else: # Pad bank C maps to named poses if col > 1: robot = 1 else: robot = 0 col = col % 2 idx = row * 2 + col poses = ["reset", "pose1", "pose2", "pose3", "pose4", "pose5", "pose6", "pose7"] self.primitives.set_pose(poses[idx], robot)
Comments are closed.