Changed pitch conversion code