Write a program trying all permutations of notes and picking the "good sounding" ones. Do a research on music perception.
Name:
Anonymous2014-10-10 7:38
It's not hard to automatically synthesize pleasing music. Musical theory has been very well understood for centuries so it won't be hard to design algorithms that use it.