I think adding some comments to explain how the name and octave are mapped to the key would be fairly helpful.