Resolved various clicks which were to do with envelope and ramp
calculations. Had to alter the way the envelope factor lookup worked.
Now works through each note and the ofset and factor are stored within
the note ready for the next lookup cycle.