Added the rest of the algorithm. Debugging enharmonic with pitch.simplifyEnharmonic().