Suppose I have an instrument which is out of tune. For example lets say, as an example, the notes it plays are as follows: C+20 cents, C#+20 cents, D+20 cents D#+20cents etc. In other words, it plays all its notes 20 cents too high.
I then record this instrument, having played polyphonic music on it.
What algorithm can I use to tune the track so that the notes become: C+0 cents, C#+0 cents, D+0 cents, D#+0 cents. I wish to solve this in the frequency domain and I have implemented an FFT and IFFT in this regard.
UPDATE
Please note that the algorithm should work out the 20 cent offset by itself without me having to supply it. I might later record another instrument with a -35 cent offset. All I know is that the notes are relatively in tune, but the instrument itself relative to other instruments might be out of tune by x cents.
I am interested in human voice, but also other instruments like violin, flute, guitar, piano and analog synth.