change the pitch using distance