I'm making a program that generates random simple melodies, based an a randomized basic chord progression from the C Major scale.
What would be a good way to generate a chord progression of 4 triads from this scale? Generating 4 completely random triads (from the 7 existing ones) from the scale usually doesn't sound very good.
I need an approach to generate a chord progression that will sound good or okay, but I don't want to simply choose a progression randomly from an existing pool of progressions. I still want the program to generate these 4 triads by itself, using some simple algorithm to ensure that the generated progression sounds decent.
(As I said, these 4 triads will each be taken from the 7 triads of the C Major scale).
Please note: This question is not a duplicate of my previous question about an approach for creating an algorithm for melody creation. This one is about finding a way to generate a chord progression. Generating melodies is a different topic.
Thanks for your help
EDIT: General guide lines on how to know if a triad will sound okay next to another triad, will also be great.
Sounds like you need to break this into phases:
I think this solution might end up being pleasant to work on too - you can slowly build up a collection of filters, each which does one simple thing - but put together, you gradually work out what it is that defines "decent".
(*) The sounds decent is defined in terms of with reference to the previous triad(s) (if there are any), and this is where you could write filters like:
Does the root note of the triad fit on a logical pattern relative to the previous root notes?; examples:
Do the notes of this triad have at least one common note with the previous triad?
Is the "jump" from the previous triad "less than" some given threshold?