Instead of taking the first pitch above a threshold, it scans right from there until it finds a peak, and returns that. A peak is simply a pitch which has a higher value than either of its neighbours. The NUM_SAMPLES/2 thing in FFTWorld is to match the N/2 in Pitch when finding the pitch. Indices above N/2 actually represent negative indices, so possibly we should be paying attention to them, but I think they'll be pretty symmetric with the positive ones. Maybe entirely symmetric?