Take randomly generated sound waves (using sine curves for example), mix them together to get beats, and then let people decide which ones sound best. Let the best ones mate — add in small mutations — and wait a few thousand generations for the sound patterns to evolve into music.
That’s what DarwinTunes does, and they let you participate in the artificial selection process (artificial as opposed to natural selection).
The details are included in their article: Evolution of music by public choice by MacCallum et al. (2012).