"To my surprise copying this code into Processing, worked perfectly with my Arduino code."
Which part of the code did you use, the writing to the serial port or the comport identification?
I just used the full code because I wanted to see if it would actually work. It is set up to allow for a mock serial monitor to be used in processing.
I am going to try and identify how it works to incorporate into my original code.