Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

An algorithm to create a simple chord progression

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.

like image 527
user3150201 Avatar asked Jan 15 '14 21:01

user3150201


2 Answers

Sounds like you need to break this into phases:

  • Firstly, generate a triad randomly from all the possibilities of this key
  • Secondly, apply one or more filters to eliminate ones that don't "sound decent"(*).
  • Keep going until you've got 4 triads that pass all the filters.

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:

    • Simple ascending
    • Simple descending
    • Ascending in thirds
    • etc
  • Do the notes of this triad have at least one common note with the previous triad?

    • this could find some pleasant-sounding inversions
  • Is the "jump" from the previous triad "less than" some given threshold?

    • to avoid jarring jumps all over the scale
    • simply achieved by summing the MIDI note values of the triad and comparing with previous
like image 148
millhouse Avatar answered Sep 29 '22 17:09

millhouse


You could check these papers

Generating Music Using Concepts from Schenkerian Analysis and Chord Spaces

and A Probabilistic Model for Chord Progressions

But this subject is complex as you want it to be, for example, let us say that accurate and compact representation of music signals is a key component of large-scale content-based music applications such as music content management and near duplicate audio detection. In this case You are working on C major scale which goes like:

C - D - E - F - G - A - B

which has the intervals

C - STEP - D - STEP - E - HALF STEP - F - STEP - G - STEP - A - STEP - B - HALF STEP - C - 

Now a chord is formed by distance between notes for example

C major chord is formed by C-E-G
D minor chord is formed by D-F-A
E minor chord is formed by E-G-B
F major chord is formed by F-A-C
G major chord is formed by G-B-D
A minor chord is formed by A-C-E
B dim   chord is formed by B-D-F

The problem you describe is not well solved yet despite many research efforts in this field. So for instance take a look at other papers where they suggest mid-level summarization of music signals based on chord progressions. So chord progressions are recognized from music signals based on a supervised learning model, and recognition accuracy is improved by locally probing n-best candidates.

So you can investigate the properties of chord progressions, then calculate a histogram from the probed chord progressions as a summary of the music signal. Then with a chord progression-based summarization you can describe harmonic progressions and tonal structures of music signals.

But how to do it?, well you need music datasets ( > 70,000 songs ??) so you can retrieve relevant information...

like image 32
edgarmtze Avatar answered Sep 29 '22 17:09

edgarmtze