A "generative grammar" is a system of explicit and formal rules which are formulated in such a way that they may generate a set of sentences (ie. a language). We discuss a computer software system for which the grammatical rules of a music language can be precisely defined. From these rules the computer system may generate automatically music compositions.