Melody Generation
Automatic melody generation is often done with a Markov chain, the states of the system become note or pitch values, and a probability vector for each note is constructed, completing a transition probability matrix (see below). An algorithm is constructed to produce and output note values based on the transition matrix weightings, which could be MIDI note values, frequency (Hz), or any other desirable metric.
| Note | A | C# | Eb |
|---|---|---|---|
| A | 0.1 | 0.6 | 0.3 |
| C# | 0.25 | 0.05 | 0.7 |
| Eb | 0.7 | 0.3 | 0 |
| Note | A | D | G |
|---|---|---|---|
| AA | 0.18 | 0.6 | 0.22 |
| AD | 0.5 | 0.5 | 0 |
| AG | 0.15 | 0.75 | 0.1 |
| DD | 0 | 0 | 1 |
| DA | 0.25 | 0 | 0.75 |
| DG | 0.9 | 0.1 | 0 |
| GG | 0.4 | 0.4 | 0.2 |
| GA | 0.5 | 0.25 | 0.25 |
| GD | 1 | 0 | 0 |
A second-order Markov chain can be introduced by considering the current state and also the previous state, as indicated in the second table. Higher, nth-order chains tend to "group" particular notes together, while 'breaking off' into other patterns and sequences occasionally. These higher-order chains tend to generate results with a sense of phrasal structure, rather than the 'aimless wandering' produced by a first-order system.
Read more about this topic: Pop Music Automation
Famous quotes containing the words melody and/or generation:
“Perhaps all music, even the newest, is not so much something discovered as something that re-emerges from where it lay buried in the memory, inaudible as a melody cut in a disc of flesh. A composer lets me hear a song that has always been shut up silent within me.”
—Jean Genet (19101986)
“The creation of a world view is the work of a generation rather than of an individual, but we each of us, for better or for worse, add our brick to the edifice.”
—John Dos Passos (18961970)