My Procedurally Generated Music Is Awful
devlog.groovelet.com
devlog.groovelet.com
I’ve been actively making music full time for a good 15 years now. I work as a writer/producer and despite all of my experience and theoretical understanding I’d probably be hard pressed to come up with a way to algorithmically describe my musical instincts in a way that generates satisfying music.
I think a large part of the trouble comes from the notion that most music requires a certain degree of subversion of expectation. And not randomly selected subversions either. Deliberate choices that feel meaningful. I could spend a lot of time defining one melodic phrase and immediately need to tweak the rule for the second half or a reharmonization. Not to mention rhythmic cadences and groove.
I’ve been doing a deep dive on Autechre recently and am revisiting interviews where they hint at their process. The duo is notorious for using self-built tools that algorithmically generate the sounds, texture, and rhythms. These programs are not expected to run independently or generate great music on their own. They are actively guided and performed by the band as they jam and compose. In this way it’s more of an augmentation of their will that allows them to create such rhythmically dense compositions.
In re-reading these interviews what I found interesting is that for them the act of building the program is one and the same with the act of composition. They’re defining the parameters, limits, and characteristics of a composition and then using their judgement to steer and flex the sonic structures that they’ve built up.
When it comes to generative music, I think they’ve got the right attitude in not expecting the software to do the heavy lifting. It’s instead treated as an extension of their performance.
The bar might seem a little lower for pure electronic genres but it'll still be some time before Steve Faoki is consistently better than the real deal.
When I produce music digitally, I usually get the most interesting results by randomising devices. For example, in Ableton Live there is a device called "Device Randomiser" that can randomise other devices. A few of these in a chain can produce crazy sounds over time. Then these can be used together with more traditional soft synths, for example by using them as an external vocoder signal.
And that's usually a really small amount within the confines of "what works".
The thing is, the sound design is, in a sense, the easy part. You can buy the sound you want, with the substantial exception of some acoustic and vocal performances. You can feed it into a tremendous number of processing effects and get artistically interesting results by turning the knobs. This has been commodified: you can buy up software bundles for holiday sales right now and have an absolutely vast kit of professional production tools for perhaps $500 USD; less, going to zero, if you focus just on essentials and make good use of freebies, more if you aim for high-effort multisampled instruments and certain high-end plugins. And so we have a golden age for the improvisational electronic jam session. There's no need to build your own patches, though it helps from a sound engineering perspective to have those skills.
But compositions aren't jam sessions, they're a tighter, more directed layer of structure than that. And the problem that rears its head with algorithmic approaches is that it isn't reducable to one algorithm with different values, rather, a different piece is a different algorithm, and the final result is assembled most easily by switching between layers of intentional, hand-picked sequences and automations that extend upon them.
But if you go in agnostic to the principles driving that material, as it seems the author did, the result doesn't go in any coherent direction, and so it doesn't sound musical.
Many people like the old chiptunes on the C64. One of the distinguishing features of many of them is the fact that the sequences are, in fact, algorithmic in this way. They were not composed entirely on the piano and then painstakingly input as a sequence of events. Some were, of course, but memory constraints drove many more towards compression, if only at the level of "loop this pattern", and the lengthiest tunes leaned heavily on algorithms(one example: Times of Lore). There is no requirement for algorithmic approaches to also be academic experiments and these tunes often demonstrate that.
Somehow this fact gets very little representation in the modern DAW environment. Sequences are uniformly multitrack tapes, printed scores, piano rolls, tracker grids, or lists of events. If they're particularly cheeky they might think to use divisions of a circle. But you can define an interesting sequence in a few lines of code, really: you just need to tap into a pattern that has some intrinsic chaos(predictable, but in a difficult-to-compute way - cellular automata, double pendulums, fractals or even just a polyrhythm all work) and subsequently shape it to the needs of the larger structure. It's the use of the mathematics that matters, and traditional theory is kind of burdensome in this way, because it often obscures the mathematics in trying to convert it into something that can be muscle-memory trained and called out verbally.
In fact, most of the music ever created (not all, but a majority) was written to dance to, and typically as part of a co-evolutionary process that connected the music and the dance together.
Western art music in the 20th century made a good effort at creating music without reference to existing musical cultures, and although there have been some interesting developments along the way, for the most part (minimalism being a principal exception), it didn't really succeed at generating much music that was enjoyed by a lot of people.
https://en.wikipedia.org/wiki/Musikalisches_W%C3%BCrfelspiel
A similar thing happens in Schoenberg's twelve-tone system. For melodic writing, the composer is locked into using the next pitch in their tone-row, but the art of it comes in them exercising their ability to repeat that prescribed pitch or change it's register however they see fit to get the best possible musical effect.
It's quasi-algorithmic in that the pitch sequence is prescribed, but the writer is allowed to get creative with the other musical dimensions to make it as compelling as possible.
That said, it generally doesn't make for very enjoyable listening. At least, it's an acquired taste. 20th century classical music got pretty far up it's ass with the "games for games-sake".
A lot of arpeggiators already do something similar.
Though, i do agree with the general premise of that and think any randomly generated parts should be hand touched up by someone who knows what they're doing and should be used as any other tool in a musician's arsenal and not as a way to just generate songs wholesale.
There is a potential for random generation to be used creatively in music, it just shouldn't be used as a crutch to cover lack of skill or as the sole means by which a song is created.
I believe their compositional style is more akin to a long form improvisational jam that may then be edited down for conciseness and redundancy. I don't get the impression that they're going back and tweaking the fine details at this stage in their long career. They're way too prolific to keep that up.
Here's an example of some tracks that are typical of them:
https://www.youtube.com/watch?v=cMD_oenMGVk&list=OLAK5uy_lvg...
https://www.youtube.com/watch?v=CRBKryLk29E
As you'll hear it's pretty removed from conventional rhythm, harmony, and form. There are certainly underlying foundations, but they've transitioned into a mode that's almost entirely rhythm and timbre. In fact, by leaning into the generative components and ignoring the need to replicate traditional song forms, melody, or cadence in a credible way they've pioneered a very radical and exciting form of composition with electronic instruments.
They’re certainly not songs, in the western sense of having chords and melody. It’s a very different and unrelated paradigm. It’s primarily an exploration of rhythm and timbre. I would not be surprised to discover that a lot of what sounds like musical texture is, in fact, very dense rhythmic sequences.
I find it thrilling. Once you live with it for a bit you can grow accustomed to it and start to recognize the inner-logic of how it works. I know that they perceive it as dance music, but I perceive it more as braindance.
It's an acquired taste when you go through their discography and start to notice the intricacies of the creations, their rhythms and sound design are really damn hard to replicate.
> I think a large part of the trouble comes from the notion that most music requires a certain degree of subversion of expectation. And not randomly selected subversions either. Deliberate choices that feel meaningful. I could spend a lot of time defining one melodic phrase and immediately need to tweak the rule for the second half or a reharmonization. Not to mention rhythmic cadences and groove.
I mean this in the kindest way but... you’re right. You should not seed generated music algorithms. You’re describing something people feel viscerally as something mechanical. I don’t know if that’s how you experience music but... it’s not what most people feel hearing it. And that’s okay.
I don't think that there's anything fundamentally objectionable about generating music algorithmically. It just tends to be disappointing and not as engaging as more traditional forms of composition at this moment in time. I'm sure it'll be really exciting once it matures.
I like Brian Eno's idea of records someday being programs that you purchase instead of recordings that are frozen in time. Something that you can play and hear a different version every time that it generates. In theory that sounds really lovely.
Sometimes I do think of music as something mechanical, or procedural. A lot of artists do stuff like this with pleasing results. Steve Reich's 'Come Out', 'It's Gonna Rain', or 'Clapping Music' are prominent examples for me. Granted, those three pieces probably resonate more with the academically and musically nerdy types, but they're powerful if you keep an open mind going in and submit to it.
But right now I think the most compelling generated stuff still has an element of human input to steer it's development and isn't quite ready to run on it's own.
I think some of the most interesting stuff today is music that's composed by hand but borrows the affect of procedural music. Stuff like minimal techno that evolves very slowly. I'm particularly fond of the work of Ricardo Villalobos:
For example (with some imagination) this could be the background music in a Chinese restaurant (because of the pentatonic scale):
http://autopedie.medusis.com/#011004155|g113220|g213410|c114...
What are missing are repetitions (see the other thread by MauranKilom) and some kind of structure. But as a minimalist experiment it's fun.
Music, like all art, is communication. Randomly generated communication is just noise.
The intent in this exhibit seems to be "this is what these rules sound like", but then it's the generator itself that is the artwork.
I didn't know that about them but now their music makes much more sense to me.
For many genres, you fundamentally have repetitions at every power of two interval. For example, the hi-hat repeats every eigth. Kick drum every quarter. Snare every second quarter. Maybe an effect every bar, a rhythmic variation every second bar, phrasing covering four bars. Cadence repeats every eight bars. Melody maybe 16 bars. Verse or chorus 32 bars. ABAB song structure. It's repetitions all the way down.
As with all "rules" in music you can ignore them to whatever degree you like. But ignore too many and it just sounds like a mess.
On a related note (no pun intended), I am starting to notice that, for me, getting tired of a song coincides with "hearing" the repetition of material (e.g. chorus) at larger and larger intervals. Of course you know that the chorus repeats, but here I specifically mean that it sounds like an echo of the chorus a minute ago.
Besides structure, chords are often the same. Most of the time it's I-IV-V, sometimes I-IV-V-vi... I even saw a video today mentioning how the I-ii-IV-V of Cure's "Just Like Heaven" is an uncommon progression. For soundtracks it's often just two chords vamping. Melody notes also rarely stray from whats sounds consonant with the current chord. Dissonance is only for passing notes. In the strong beats it's certainly something consonant. Sometimes it's all just a pentatonic. You also gotta emphasise that tonic everywhere. Melodies also need structure: you gotta have that AABA (or something like that) in your verse/theme/phrase, almost like a fractal. Broken rules only happen once or twice per song, or not at all.
The more good music I dissect the more impressed I am with how simple it is.
Indian classical music (probably among the most melodically advanced in the world) doesn't use anything like the song structures you're referring to (it also doesn't use harmony).
The ease of certain kinds of music production has led to us to living in a decade (or two) of huge amounts of what I can only call "audio candy for ears trained on western popular music". There's nothing wrong with this music, but it's like eating cookies all the time, not realizing there are other delicious kinds of food out there.
From my admittedly not deep knowledge about Carnatic music, it would be a serious mistake to think of it as "being based on melodic elaboration of what in Western music would be the bass line". That's not how its composers and practitioners think of it, and critically, it misses out entirely on the whole concept of a raga, which defines not just a set of notes (the way a western scale does), but also their ordering when ascending and descending, and comes with a large amount of cultural attribution (evening ragas, seasonal ragas, emotional ragas and so on). What is played is not an elaboration of a line, but an exploration of the raga.
If you were going to draw comparisons to western musical practice, I would think that Schoenberg's 12 tone/serial experiments have at least as much in common.
My point was not that we should create only simple music, but rather that we should understand how simple music is created, before jumping into anything more complex than that, or even into a general solution like so many people into procedural generation seem to jump into. You need to understand the craft itself other than just understanding the theory.
Musical styles are not unconstrained. If you want it to produce procedural Carnatic Music, you can replace my description of western music with the equivalent for it, like zozbot234 started doing. Then you'll have a starting point.
https://aeon.co/essays/why-repetition-can-turn-almost-anythi...
It references the same speech-to-song illusion you have described.
I found this essay, and its ideas, to be really helpful in understanding in why my brain likes certain types of music -- some compositions really trigger this particular part of my perception.
Repetition legitimizes.[0]
[0]: https://www.youtube.com/watch?v=9MzKx0fKg5o&feature=youtu.be...
There are ballroom themes, battle themes, boss fights, and the last one is my attempt at a final battle track. If there's interest, I can walk through how the model works. Gwern's writeup is here: https://www.gwern.net/GPT-2-music
All 25 tracks were made in a single night. That's the kind of boost you can get from ML.
Note that it's not entirely automatic. But that's a benefit, not a downside. It's more like an AI instrument that you play.
The songs each contain the ABC source code that generated it. (Click on the song's description to see.) You can replicate the song for yourself by copying the source code into a text file, then running something like this:
abc2midi "${1}.abc" -o "${1}.mid" && timidity "${1}.mid" -Ov -o "${1}.ogg" && timidity "${1}.mid"
(That's from my bash script called "abc2ogg".)An effective model will "group" its data in a way that the model can understand. That's the essence of why this model worked so well.
But when ML generation is placed to the foreground, as the main focus, it appears like an unnerving vacuous simulacra. I can’t yet see it being something beyond shovel-like, in its function and form
The reason the beat is so unique is because the model started out by making a mistake. Or at least I thought it was a mistake; it took several measures to hear what it had in mind. GPT did its usual "generate the next most likely thing," which happens to be a rhythm that sounds good. In some sense, it's impossible to say whether it was a mistake, or if it "planned" to write it like this.
"The Cruise" is lovely and relaxing: https://soundcloud.com/theshawwn/the-cruise?in=theshawwn/set...
and "Green Mountain" is just fun: https://soundcloud.com/theshawwn/the-green-mountain?in=thesh...
As for the effect on the art world, I think indie gamedevs will be happy they have some nice tunes without having to work with a musician. There's no way to know what the wider implications will be, though. Perhaps kids will grow up hearing stories of how granddad learned to play the guitar himself rather than asking the computer to write a hit song.
[0]: https://www.filfre.net/2020/12/ethics-in-strategy-gaming-par...
You can get really far with this idea, and music is the perfect example. We enjoy patterns. Complicated patterns become more interesting with listening experience. Simple patterns are quickly exhausted. So long as there is structure, there is opportunity for enjoyment.
Of course, Schmidhuber's theory is a bit more complicated than that. And his own opinion of it is a bit ... grandiose. Title of one of his papers on the topic: "Driven by Compression Progress: A Simple Principle Explains Essential Aspects of Subjective Beauty, Novelty, Surprise, Interestingness, Attention, Curiosity, Creativity, Art, Science, Music, Jokes"
Nonetheless, I think it's a neat theory.
If anyone has any good psychoacoustic resources, I'd be all ears.
Melody is quickly becoming secondary to sound design in modern music, for better or worse.
https://soundcloud.com/zndx/20201102-01-415v2
I think it would be great to set up a studio with a few modern analog synths 'in the loop' for automated training.
[!] recorded through a Tascam 688 I found at a thrift store.
Second step is choose a lead preset based on random letter generation (whatever is closest). (I believe this is the hard part as far as generation goes ... but there are patterns to oscillator presets)
Third step is import the generated MIDI into your DAW like Logic or Ableton. Fourth, pick a key and quantize the notes. Finally pick a pad and match the bass notes.
I'll generate one right now ... all AI/randomized except for the design of the preset. Be back in 5 minutes.
lol, if this is interesting to anyone let me know and I'll put together a yt video.
Repetition is key to people being able to latch onto music, but you can still deeply randomize things. What I'm doing is driving everything off Music Thing Modular Chord Organs, with firmware I programmed. Everything's based off a chord (or note) choice within one of twelve keys, and the secret is that you've got to modulate by circle of fifths, not chromatically. Also, chords are better arranged off pentatonic roots, rather than diatonically.
Do that and you can go to challenging jazz chords, but things hang together in a logical/musical way. I've been evolving this system for years: here's a jam with heavy reliance on procedurally-generated chords and arps: https://soundcloud.com/airwindows/therefore
And this one's more recent, but set to wander a bit more far afield as far as the random range goes. Chords and roots and arps generated procedurally, plus other playing on top. https://soundcloud.com/airwindows/fogbound-2020-11-03
> I can just barely read music. I can’t deal with that!
Sadly, the author has this backwards. Reading music has almost nothing whatsoever to do with the music theory (admittedly gobbledy-gook) in the first paragraph.
If you're a coder, you can do music theory. You might choose not to, and that's OK. But don't make it out to be harder than it is. There are lots of places to start.
The problem with not reading music is not that you won't be able to understand music theory. It's that it is very hard to find anyone who will explain it you (in person or in writing) without the terminology (and conceptual skeleton) of western notation and 18th century western tonal harmony. Neither of these things are actually central at all, but good luck avoiding it if you were ever to try.
As someone who has had zero music training, but has considered generative music as a possible hobby, I'd like to at least start trying to understand the domain before committing to a physical instrument and working on developing muscle memory. I'd really love a rigorous music theory textbook that does not assume you already play an instrument.
Musical set theory [1] is an examination of scales/harmony without giving preference to western modes. The harmonic series is a physical phenomena at the root of all musical cultural behavior, and is a completely rigorous subject.
The diatonic scale isn't derived by stacking fifths, since that would be tautological: a "fifth" is a concept taken from the diatonic scale. What you likely meant was "derivation of the diatonic scale by stacking key integer ratios between frequencies, particularly the ratio 3:2)"
That already elides the whole concept that dissonance and consonance correspond to the presence or absence of non-integer ratios between frequencies with notable energy. It also skips over the admittedly subjective way in which introducing more dissonance by way of "odd" ratios can still be perceived as musically interesting (though almost always in culturally determined ways).
[1] this isn't pure MST, but it's a great place to start even if it is limited to 12TET tuning: https://ianring.com/musictheory/scales/
https://www.amazon.com/Harmonic-Experience-Harmony-Natural-E...
The core of it boils down to stuff like:
* scales are arrays of note offsets:
* majorScale = [0, 2, 4, 5, 7, 9, 11]
* to change a scale's key, offset each note:
* dMajor = cMajor.map(n => n+2)
* "modes" typically means scales that are reindexed:
* dorian = major.map((n,i) => major[(i+1) % 7])
and so on. Obviously knowing that stuff doesn't make the music theory any more intuitive - if a textbook says "a V/ii chord", I have no idea what that sounds like. But deriving what notes it has, or writing a function to play them, is super easy once the terminology is demystified.Until your article is done, can you recommend other sources that go into this?
Regarding modes, your presentation is excellent and true (AFAIK), but why some scales don't have the same modes as other scales; given scales with the same number of notes, they should have the same modes?
Yet for example, while the modes of the major scale are Ionian then Dorian, Phrygian, Lydian, Mixolydian, Aeolian and Locrian, the modes of the double harmonic major scale are [name of the scale] then Lydian, Ultraphrygian, Hungarian, Oriental, Ionian and Locrian.
Is it only a problem of nomenclature or is there a profound truth behind it?
That said, for modes, AFAIK the names are all 100% arbitrary and used for historic reasons. For scales with varying numbers of modes, the first thing that jumps to mind is that some scales have modes that are identical to the scale, or to other modes, so references probably leave them out (e.g. consider the modes of the whole tone scale!). But there's probably also cases where this or that mode might get omitted because it whoever wrote the authoritative textbook about that scale thought it sounded awful, or felt it shouldn't be considered a mode for whatever reason.
There could be other stuff going on I don't know about - when I was learning this stuff I ignored big swaths of material that didn't seem useful for programmatic music.
This annoyed me a lot when learning the basics. One thing I noticed when I experimented with what things would be called without the traditional names is that I would lose the "namespace" of what I'm thinking about. I think the names are awful, but Dorian means something specific, C something specific, etc. You can map it to just numbers like... scale 1 for note 1, mode +1, chord 5 and it may be initially easier to "calculate" the result, but also more confusing.
But then you just get used to the names with enough practice. A bit of a Stockholm syndrome. They're still awful, but familiar enough you stop caring.
"scales have modes"
This is wrong. A scale is an interval series. A mode is an interval series. There is no difference between them.It just so happens that there are ways to permute some interval series to generate others. Because western music is so focused on the interval series we call the major scale, people noted that you can permute this into a series of other interval series. But none of those interval series (Aeolian, Phrygian, Lydian etc) "own" or are the basis for the others: they are all related by permutation. You could just as easily say "Modes of the Phrygian scale" and you would still be referring to the same set of interval series.
Modes are (typically) permutations of scales. The fact that a permutation of a scale is also a scale doesn't mean it's wrong to say that scales have permutations.
Feel free to extend, "steal", add or whatever.
I'd also love to see a book, blog post or article from someone who's more competent then myself.
[0] https://github.com/abetusk/dev/blob/release/notes/MusicNotes...
[1] https://github.com/abetusk/scratch/blob/release/notes/Music-...
For me, the real insight came when I understood why the 12 note chromatic scale was chosen, why chords "sound good" and that a lot of the confusing terminology hides pretty simple concepts.
I don't feel like I could make any music, generative or otherwise, that sounds passable but here's what I've learned so far:
* As a good approximation of the human auditory system, frequencies are perceived on a logarithmic scale
* Rhythm is tied heavily with language and the tempo of speech, word length and frequency [0]
* Note combinations sound more "pleasing" when the ration of their frequencies are small as reduced fractions [1]
* The 12 note chromatic scale is a good compromise of number of notes and enough pleasantly sounding note combinations
* The 12 note chromatic scale is generated from a base frequency of 440Hz multiplied by the twelfth roots of 2
* The 12 note chromatic scale can be further restricted to the diatonic scales to help further restrict the note set to allow for ease of composition
As far as I can tell, a lot of music theory centers around the different diatonic scales ("Ionian", "Aeolian", etc.), which are just restrictions of the chromatic 12 note scale to some notes that sound reasonable together. I have some very rough notes on it [2], though I'm not sure how readable it is.
I'm also in the same boat in terms of "instrument choice", though I would much rather invest in some live coding environment, like Gibber or Sonic Pi, or some software DAW system like LMMS. I still haven't found something that gets at the right level of functionality and abstraction that I want.
[0] https://github.com/abetusk/papers/blob/release/Music/patel20...
[1] https://github.com/abetusk/papers/blob/release/Music/measure...
[2] https://github.com/abetusk/dev/blob/release/notes/MusicNotes...
Sometimes awful music stays awful too.
After you give it a listen, consider that it got one of Pitchfork's rare 10/10 reviews and ranks high in many lists of the greatest albums of all time.
1) obviously algorithmic and pattern/rule based 2a) generated from computational statistics (deep learning) but handpicked to show only the best results, or... 2b) applied to very simplistic musical styles that sound roughly fine no matter what you do (techno, elevator pop, etc.) or... 2c) not handpicked, but exists within a strange "uncanny valley" where you can tell it's not quite right and just feels a little "off" the whole time
It’s pretty easy to take a style of music and produce something that sort of goes round and round modulating into different keys and so forth without actually going anywhere in particular.
But what you’re really doing is composing a parameterised piece of music and the randomly substituting parameters as you play it. This is what people are doing in real-life with things like cocktail piano anyway. If you can’t compose to begin with then you don’t stand a chance, however.
I agree it’s about triggering emotions... and for that having the ability to empathise helps.
That can be useful in certain scoring contexts where you want the music to be background while dramatic on-screen elements occupy the foreground.
That's a pretty limited use case, though... which is basically my point. In most circumstances, the twelve-tone technique doesn't produce results many people find compelling.
https://github.com/devinroth/GenerativeMusic
Its a lot more opinionated, its not just a blank slate at the start, but thats the only way to generate stuff that sounds nice, as things stand at the moment.
I think the author's biggest problem is the bottom-up approach of creating lots of raw clips and then at a higher level trying to assemble them. I've found music generation to consistently be a very similar task to text generation, and to me the author's approach seems analogous to generating lots of random sentences and then trying to assemble them into a short story.
Everything I've done that's worked has been completely top down - the core of the engine determines the state of the song (we're in the A section, bar 7, the current chord is V/V, etc.) and the low level parts generate something to match all that. E.g. the melody part might decide to play the root tone of the current chord, but it has to ask the core what note that would be.
The hard thing about this approach is that you need an environment where you can dynamically play notes of an arbitrary pitch/length/instrument, which either means lots of sound fonts or realtime audio gen. I've been doing this with WebAudio, and while it works it's been very painful - for me the "play sounds" part of procedural music has more difficult than the "compose music" part.
Edit: tune -> tone.
I wanted everything to be realtime web audio, so I wound up just building instruments out of oscillators and so on. Here's a very old sample to give the idea:
I find using the sampler very easy and convenient.
a jazz chiptune: https://fenomas.com/2017/12/advent-17/
Zelda as gypsy jazz: https://fenomas.com/2017/12/advent-13/
vaguely fuguelike: https://fenomas.com/2017/12/advent-18/
On that basis, I would definitely grant the implied generalization of the title: if the audio samples in this post aren't good enough for you, then procedurally generated music won't cut it. On the other hand, if you want procedurally generated music, and you could see yourself living with the music from this post, it would definitely be workable.
https://arstechnica.com/gaming/2019/08/yachts-chain-tripping...
My friend once said: Would you ever read a randomly generated book? ... so why do you think that any other art form would become palatable under procedural generation? (game levels, music etc.).
Procedural generation is quantity over quality. It makes sense in some settings, but not in 1st order art.
1. You may have, and didn't notice! ;-)
2. Games use randomly generated terrains and it feels just fine.
I'm forced to disagree -- in part -- here. There are plenty of beautiful and stirring (or even just intriguing) generative pictures out there. I agree in part, though: from my own experience, generative music composition is harder than generative imagemaking. Probably because there are many, many more dimensions of choices that need to be made.
But were you are aware that there exists a whole industry for licensing music for the kind of thing you're doing? Getting music licenses is not hard. It might be too expensive for your use case, but this is what many game companies do.
I'd bet that in that same time or less, you could learn to improvise equally decent stuff - probably far better - yourself on at least two instruments. If you've been listening to music for 5-10 years, you'll probably never 'train' a machine to know what music is as well as you've been trained.
Whichever way you go, if the product can't compete with the flood of stuff that's already out there? including production quality? I can guarantee you what people's reaction will be. Not pretty.
1. Have a background server process generate 8-second three-part-tune clips
2. Use some basic heuristics to guess at the key signature (“C# major”) of the clips, evaluate their intensity (lots of drum hits? loads of notes?) and save them in a huge clip database.
3. Create a search interface for the clip database.
4. Have the client request clips from the server in a specific key and intensity.
5. Weave two or three clips together, repeating them a couple of times, to make a full “song”.
I think thats just a bad plan, and if you start from that, any embellishments or improvements you try to make later just wont get anywhere.
Why is it a bad plan?
Working out what key signature a short phrase of music is in is not that simple.
e.g. you can look at the notes and say 'well that fits C major' but actually C major and A minor contain the same notes, and the difference between them is subtle, its to do with how often the root note is used, or even more abstract stuff like how often the root note is implied. There is kindof a probability distribution of notes for each key signature, and that distribution is how we recognise them. Sometimes there's ambiguity, and thats part of the art.
If the generated clip only uses (say) 6 semitones, there might be a multitude of differnt key signatures or scales that it could _potentially_ fit into to (Pentatonic, phrygian, Major, Minor etc etc with various different root notes), but the most accurate one musically would be very hard to determine out of context, because in reality the context around the clip (say the 20 bars before and after) play a big part in how a 'clip' would be experienced.
And if you're going to generate random clips to begin with (step 1), I'm hoping those werent random clips where any of the 8 tones or 12 semitones in play have an equal probability of being used, because thats just going to sound muddy.
I guess he was going for a system that had very few rules and then tried to get the system to learn from there, but I think thats just too muddy a starting point to ever get anywhere.
And obv purely generative music is hard, but what I'm talking about here I think explains why the stuff he generated was classified by him as 'awful' rather than just 'weak' or a bit boring.
TLDR: I think a misunderstanding of what a key-signature really is might be to blame. Its not just 'which notes', its a whole probability curve and its very contextual.