private static boolean isLocalMax(double[] frequencyData, int i) {

		if (i - 1 < 0 || i + 1 >= frequencyData.length)
			return false;

		double left = frequencyData[i - 1];
		double mid = frequencyData[i];
		double right = frequencyData[i + 1];

		if (right < mid && mid > left)
			return true;

		return false;
	}