Code gets stuck on the last note of the melody after being played

I count 65 notes but only 64 durations. The last duration will be read off the end of the array.