@ anonymous1337
If i was to write i chord finder i would approach it from the perpective of the different notes that make up that chord
Simple chords have just 3 or 4 notes, i would do a graphic of the entire fretboard and light up each of those notes in a different colour right across the fretboard...if your fingers can be twisted to reach the required combination then you have 'your chord/chords'
Sometime you will play a chord up high and include an open string or two, other times you might use your thumb to fret the low E string. On occasion you might even play overhand Jeff healey style. Other times you may place both hands on the fretboard and strum with your free thumb or little finger. I have even played cross hands, fingering a chords with fingers of both hands but actually strumming with the thumb of my left hand ( my fretting hand)
A guitar is a 'shoot from the hip' type instrument. Its expressive yes, but crippled.
Your exact chord fingering being dictated by things like convenience of changing chords, the
kind of tone you are seeking. The tone and physical position of
where you are coming from and the tone and physical finger position of where you are going too. Tone is incredibly important on the guitar.
When standing up playing live you might choose one fingering, when sat down in the recording in the studio and have greater control over the tone, effects and post processing you will often choose a different fingering.
Likewise you tend to reduce the complexity of the chords when playing with others in order to leave room in the mix. Sometimes ill choose a simple fingering thats bright with a sharp attack in order to cut thru but not overwhelm, other times i may use a more complex fingering that is intrinsically soft and non invasive but gently fills a wide musical space.
If your playing with distortion you will often use a different fingering. Mostly to reduce inter modulation effects but sometimes to enhance that effect....I will often use a different fingering dependent on effects type, what works with multitap echo may sound utterly pants with a flanger, wah, heavy chorus or saturated reverb.
The chords you see in books or in online chord finders are just to get you going. YOUR EAR IS KING , musical theory is only there spring board to leap from.
hope this all helps...i haven't looked at a chord chart for decades, if you know the notes you are playing ( can count along the frets) then that method is as good as any for constructing chords, and inversions of chords...a lot of inversions are used, grace chords and grace notes are commonly deployed to sooth out the musical bumps....at the end of the day its all maths. Each and every note comes with a series of harmonics that enhance,or fight the others.
Key: Chord fingering choices and 'the way you play' those notes can bury or highlight the notes and their accompanying harmonics.
In the final analysis
Music = the maths your ear can understand
A tired virgin ear and an experienced ear will perceive things very differently...no one goes to a Jazz fusion concert with a headache, lol...all these things and many more have 'strong' influences on chord fingerings....ill cheekily add, less time coding and more time strumming with your eyes shut will flatten the learning curve....we all get bogged down in theory and fingerings at some point, wade through that intellectual quagmire with gritted teeth, but on the other side we can relax and spread our sonic wings.
I feel your pain...im just learning to play the piano (well the synthesizor truth be told) but because i know what the basic notes are that make up a chord i have felt no need to consult a piano chord book...fumbling is fun....who put those black keys there ??? damn fools spoiled the cromaticity of what is essentially a big flat guitar harp !
Guitar harmonics well worth a read before you start attacking the chord problem with computer code. Because i studied physics before i picked up a guitar i knew about this sort of stuff in advance and it is 'fundamental' (scuse the pun)
http://en.wikipedia.org/wiki/Guitar_harmonics