But if you are looking to understand making music programmatically, understanding rhythm is pretty important and i have not found any good rhythm resources except for Godfried Toussaint's book, which I'm studying now. Groove Pizza is a good online tool to experiment with rhythms as described in that book.
Also... The Beatles couldn't read sheet music. Some of the best music in the world came from people who know nothing about music theory. You dont need to totally understand what you are doing to make something amazing and new. I encourage anyone to lay out their own path to find their music.
My key is like C Major, but with an added G#, and the tonic can be either EM or Am. It gets used in "gypsy" jazz music.
I encourage you to invent your own theory.
The basic ideas of academic harmonic analysis have been stable for many years. Any undergrad textbook from the last forty or fifty years, would be fine and will be more consistent with the academic language that forms the basis of music theory discussion.