Added pitch detection.