I am currently working on a guitar training progam that compares guitar input from a guitar to a song as you play, to give a score of how well you're playing. The reference song is converted from MIDI to a waveform. The user input is taken in by cable as an audio stream. I want to compare the user input to the reference. Essentially, I want to compare the two signals in terms of pitch similarity. I am not necessarily interested in detecting the note of the input signal, just how similar the pitch is to the reference sound.
I have tried comparing frequencies using FFT, but sometimes there is a difference in the peak frequency between the guitar input and the computer generated audio when the same note is being played.
Does anyone have any advice on which method I could use that would be possible to use in realtime?