Can I generate a chord track from an already recorded midi track?

Then edit, since it will miss a load of chords and get others wrong. I find it quite hit and miss (especially, if it is a synth part, with any overlapping notes)