add check to prevent currentOctave from going below 0 and above 8