Here's the other thing about this. People only use those four because sine waves add together to make interesting sounds and the rest make interesting sounds when filtered and detuned, especially if you can have moving filters and all sorts of stuff. The thing here is that you're never going to have interesting sounds synthesized in realtime without a sound library or enough knowledge of Numpy and math to fake it. The other wave shapes don't exist like you think they do. When we start talking about complex sounds, we start talking about them in terms of the volumes of the sine waves that make them up. There is only one basic wave, the sine wave, and all other waves can be described in terms of it.
I didn't want to go into this because it brings up more questions until you actually work with it and requires knowledge of both notations for complex numbers for any sort of quantitative understanding, but I think a qualitative description is in order.
There is a thing called the FFT, for the Fast Fourier Transform. As I said, every sound in all the world is made of a sum of of sine waves--specifically, for a fully precise representation, you need an infinite number of them. But computers are quantized and only capable of a certain precision, so we can make it finite in computer land (and, in all honesty, it's possible to make it finite in real life for many cases). instead of talking about adding specific sine waves, we say we're going to add sine waves at certain frequencies always and specify the relative volumes and phases of them--a sine wave that's ignored simply has a volume of 0. The phase is when they start: the part I glossed over is that we don't have to start all the waves at the same time--we might start 1000 hz at time 0, hold 1001 hz until time 0.2, and the like. This system can let you talk about manipulations of sounds in a meaningful manner: one way to apply a lowpass filter is to apply the FFT, turn down all the frequencies you consider high, and then undo the FFT to get a sound you can play out of it.
So what happens in real life, when you get your music synthesizers and whatnot, is one of 3 things: we do our analysis and resynthesis off the FFT, we get a complex wave shape by recording and pitch bend it in realtime (which is trivial, believe it or not), or we start from the basic shapes and apply filters and effects. The first of these is really, really, really rare. The second of these also brings up an interesting point: those "other waves" can and usually are either recorded and cut down to one period or simply drawn with a mouse.
How exactly we get from here to code, though, hits the wall of I know math really, really well. Basically, you can pretend that its one second of audio no matter how many samples you have and then choose to play it back--it's the same reasoning I gave for the basic functions, only this time the function comes from a table and you interpolate between values with a weighted average or, in the few cases you need it, a more complex algorithm called a spline. I'm too tired at the moment to write sample code for the weighted average approach: it's simple enough, but it's also where one of those issues with floating points is hiding, and I don't want to work it out again in Python. It comes down to like 10 lines, however.
As for programmatically working with the FFT, I suggest not doing that. You need trig and knowledge of complex numbers to figure out how to interpret the results and it's the opposite of intuitive. Finding or working out sample code to do pitch bend, either yourself or with Pygame, is worth it: you can record a wave file and just pitch bend it, which gives you a great number of interesting sounds for what is--in the grand scheme of things--barely any code (pitch bend is my weighted average thing again).
I'm sorry this explanation can't be more clear. I'm trying very very hard to avoid words like magnitude and angle of a complex number, frequency bins, and the like. If you want to learn about this stuff, I suggest installing Pyo, reading its tutorials, examples, and documentation, and trying stuff. You can come to a practical understanding of the FFT without math, but the only way to do so is to play with it in an accessible environment. One way to get access to something FFT-like is to play with Audacity's equalizer. The funny thing is that it's good at describing sounds but not so much at synthesizing them: the filtered waveform approach is more common. Pyo can let you play with this, too, either using wave files or the basic shapes.
basically, from here out, your road to understanding is experimentation more than anything. You don't have the pretty pictures and cute diagrams, nor the math to understand the equations. Therefore, the best thing you can do is play and listen to the results.
Twitter: @ajhicks1992