After that how to analyse the frequency and extract the main frequency of the signal
And that as they say is the rub. It is almost impossible to do and is actually impossible to do well. Even with a processor much more capable than the arduino it is impossible to obtain perfect results. Just look at the number of successful commercial units there are.
The main problem is detecting what octave you are in with al, the harmonics and a simple FFT is not going to cut it. All this is for one string, if you want to do all six at the same time forget it.
Sorry but this is much much harder than you think