pitch detection working