In the interest of improving my musical knowledge, I bought several books about music, synthesizers and sound synthesis. Music theory is more directly related to the question of how to build music. If it was possible to infuse enough musical knowledge in a piece of software, it ought to be possible to get something that sounds musical out of it.