How to determine the pitch from GetSpectrumData() to make a polyphonic tuner?

Hi,

I’m currently stucked with no clues on how to get accurate analysis of the getSpectrumData. I’m trying to make a pitch detection or polyphonic tuner for guitars.
My existing idea is to pinpoint the exact position of every pitch on the guitar frets through the samples:float[] data.
Does anyone know an effective way to collect those data or any other workaround to make a pitch detector?
Thanks in advance.

I’v been searching and trying for weeks and the results are same as yours not even close, please if u find something can u share it.