Pd OSC ints > Processing > Arduino > shif

if i type a 1 first its fine... if i then type 33 the next number is 13... then a 3 will pop up. Any ideas on where I'm going wrong?

You need some kind of end of packet marker. The Arduino needs to read all serial data available, on every pass through loop, not just one byte.

In addition, the Arduino should not be calling atoi until the end of packet marker arrives. When the end of packet marker arrives, do stuff with the serial data, and then re-initialize everything in preparation for the next packet.