8

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.

Matthieu Brucher
  • 21,634
  • 7
  • 38
  • 62
user3150201
  • 1,901
  • 5
  • 26
  • 29
  • 1
    If it were me, I'd use a [Markov Chain](http://en.wikipedia.org/wiki/Markov_chain) with certain chords *more likely* to follow others, so it's not just random. In addition, some basic tips can be found in an [answer on Music.SE](http://music.stackexchange.com/a/3803) – Geobits Jan 15 '14 at 21:57
  • I see you want an algorithmic method to do this, but sometimes a feedback loop in the process will help a lot. Say you generate a progression that you didn't like - if while running the program, you could give this feedback (store it in some way), and let it influence the next generation, you could get away with not using a set of known progressions. – Raja Jan 15 '14 at 22:34

4 Answers4

3

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
millhouse
  • 9,817
  • 4
  • 32
  • 40
  • Thanks for answering. Thing is, all the seven triads in the Major scale sound 'decent'. They're all simple chords that sound good. My challenge is to find a way to make a progression of 4 triads, that will sounds good played one after the other. If this is what you meant in your answer, to check after each chord if it sounds 'decent' after the previous one, this is exactly my problem. I don't know how to do that. – user3150201 Jan 15 '14 at 22:03
  • The problem is that neither does your computer. Some programs are trained by reading in a large database of music, some are weighted for "what sounds decent" by the developers, some are crowd-sourced voting methods, etc... There isn't a sure-fire way for a computer to know what sounds "good" without you telling it, as it's purely subjective. – Geobits Jan 15 '14 at 22:09
  • @user3150201 sorry I wasn't clear - the filters are aware of previous triads in the progression - I've added examples in my edit – millhouse Jan 15 '14 at 22:14
1

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...

edgarmtze
  • 24,683
  • 80
  • 235
  • 386
  • 1
    I admit I wasn't following a lot of what you wrote :) But basically what I understand is that you suggest having the program scan through lot's of progressions, and have it create progressions similar to those that it learned? – user3150201 Jan 15 '14 at 22:21
  • Yeah, because it learns emulating human learning of chord progression, suppose you give it only heavy metal progressions, your program will have some metal style when generating new prograssions... basically you train it and classify progressions, like, I love this chord progression so assin a 1, if you do not like it you assign 0. At the end yu would have several chord progressions with 0 or 1 – edgarmtze Jan 15 '14 at 22:51
0

Actually that's quite an interesting question.

I would say that one more thing needs to be considered and understood here: What would you like to say (i.e.: express) with your chord progression? I assume that you would like to express "something meaningful" with your melodies and with the supporting chord progression.

Now, "something meaningful" is not an exact term. Personally I would describe this term as something whole, something complete, as a short story. It can be as brief as 4 chords, but it should tell something and should add up to a full story. If we accept this then I would say that your 4 chord should "lead" from the beginning till the end, and we should "feel" the last chord as it was a satisfying ending (resolution) of the "story".

The hard part is that for every human, the terms "satisfying", "decent", etc. can mean quite different things, and what is satisfying for you maybe it is not satisfying for another person. Although in music theory there are some basic guidelines (linked above in the answers and comments), which were tested by great composers through hundreds of years of music, so I guess you should try some of those hints.

zolley
  • 6,030
  • 1
  • 14
  • 14
0

Define the 7 normal triads of C major and put them each in 7 separate 3 vectors. Then use a random generator pick 4 chords specifying whether repeated chords are allowed or not. If you want the progression to be "hipper", use 7th chords and extensions/alterations. For this version, you'll need 4 vectors for 7th chords, 5 vectors for 9th chords, 6 vectors for 11th chords and 7 vectors for 13 chords. If you first define a scale as a 7 vector going from C to B, then you can actually generate all of these chords by simply looping around the scale and extracting every other note similarly to how they are defined. You still have to specify when the loop terminates or else you'll get an endless chord that's inaudible. Python and many other programming languages have an actual library for different frequencies so if you define each note with a specific frequency, you can use this program to write melodies, harmonies, and entire movements.

  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Sep 13 '22 at 13:22