Add finding pitch median function