Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
To address Knut Inge's point: I strongly agree that if your instrument can play multiple notes at the same time (keyboard or guitar, among others), you can't use auto chord and call yourself a musician. I play alto sax mainly, but can play tenor or bari sax as well. None of these can play more than one note at a time. This would give me the ability play lead while allowing the sax to create its own accompaniment. This could be expanded to all useful 3 and 4 note chords. The major chord only version would take a few hours to create, and new musicians would enjoy the sound they make much more.
I would like to address the OP's question directly, which I did not do last night. There is no earthly reason to build such a program, since many of the most popular songs consist of only three chords (I root, IV perfect fourth, V perfect fifth). You should be able to pick these three chords out by ear. I would guess most of popular music has between 3 to 7 different chords. They change in predictable, repeatable ways every 8,12,16,or 24 bars in a sequence known as a chord progression or the "changes". You need to pick these chords out by ear, if you going to be any kind of musician.