Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login

Indeed. Another fascinating approach to generative music is to code it out, and add some randomness, like this guy who does a pretty good stab at imitating Keith Jarrett: http://homepage.mac.com/digego/study_in_keith.mov (25MB mov file)

This really shouldn't have the problem of repetition. You even make events in the game affect the music, to make it less monotone, and add to the mood of the game. It has been tried, but as far as I know no one has actually published something like this yet.



sort by: page size:

Randomness is just one of many possible algorithms generative music can use.

For example: Music for Airports is built from very long tape loops with different durations. It's completely deterministic, but the results sound like a random-ish stream of constantly changing note patterns.

It only works because no human has a long enough memory to hear the loops as loops. If our short term memories could hold a long loop as a percept we'd have a very different and less interesting listening experience.


If you think this is impressive, consider that Mozart himself wrote an algorithm to randomly generator music... and it still sounds like Mozart: http://www.rationalargumentator.com/index/blog/2015/06/varia...

Reactive generative music would so cool

Fair enough. If there were rests of different lengths between the notes, I might have included them. But as you say, the generation model still works, and as computers become more powerful, such perversities will become more common. :)

I look forward to future algorithms that will, on demand, create random but coherent music that closely resembles Mozart, or Beethoven (the string-quartet Beethoven, not the other one :) ) or another composer of the user's choosing. I know some pilot projects like this have been done, but they're not accessible yet.


This made me think about procedurally generated / data feed based game music.. how about never ending background music that's never (almost) the same than before?

The field of generative music is very under-researched, but there are some great things out there, including tonal and "harmonious" ones.

Try David Cope: https://www.youtube.com/watch?v=CgG1HipAayU

And xoxos' "BreathCube" and "New Blend": http://www.xoxos.net/software/software.html


I wonder if this would be applicable to video game music. Be able to make stuff that's less repetitive but also smoothly transitions to specific things with in-game events.

I like making music this way.

Have you tried automating it? "Generative music"


Generative music from data.

Cool!

When I read Hawkins's book _On Intelligence_ back in the mid-2000s I had thought it'd be cool to generate music by having the system predict what was novel and what was familiar. By mixing some novel and familiar notes/rhythm/tempo/timbre/percussion into the stream I should be able to make new music from scratch. I was annoyed that so many systems trained blindly on existing music instead of using first principles to generate something (although existing music seems useful for seeding the novelty/familiarity parameters). For games especially it would be nice to turn up or down different types of novelty to match what the player is doing.

However, as often happens, I got distracted before I got there. I learned Pure Data, and then got into audio synthesis, and then got into signal processing, and that led to procedural map generation … :)


wow that's cool! I like Jean-Michel Jarre and I like seeing music created through code, awesome that it combines the two. Though to be a bit of a pendant I'm not sure it is truly generative music (https://en.wikipedia.org/wiki/Generative_music), as I assume it is looping identically and so isn't "ever-different and changing".

I think of generative music as being stuff like this (copy pasted from the interwebs long ago):

echo "g(i,x,t,o){return((3&x&(i*((3&i>>16?\"BY}6YB6%\":\"Qj}6jQ6%\")[t%8]+51)>>o))<<4);};main(i,n,s){for(i=0;;i++)putchar(g(i,1,n=i>>14,12)+g(i,s=i>>17,n^i>>13,10)+g(i,s/3,n+((i>>11)%3),10)+g(i,s/5,8+n-((i>>10)%3),9));}"|gcc -xc -&&./a.out|aplay


It was my impression that generative music uses some sort of evolutionary algorithms, no?

Meh. There’s plenty of deep learning music generation stuff out there, this is still a really cool approach

I think it would be cool to combine the two. Instead of generating raw midi, your GAN or reinforcement learning agent or whatever could try to generate sequences of transformations to melodic fragments. Neural program synthesis type stuff.

Or maybe one could build an automatic music analysis tool that can start from the score and try to infer the program that generated them. (Is that a thing already?)


Yeah, very nice. This gets something right that so many other generative music experiments get wrong, which is variation in note length (aka tempo). You see other generative music use Markov Chain for note choice but not note length and it quickly becomes very "same-y", whereas this has, for the vast majority of melodies it generates, a natural feel (to me).

I wish I understood the WebAudio API better to get a better handle on how the instruments are created.


Just found this comment. I'm a bit into generative / algorithmic music; here are two demos I made a year ago: https://fligenstein.bandcamp.com/

One is just piano, the other is keys and drums. On Bandcamp they are about 10' each, but they can be made of arbitrary length, without ever repeating themselves exactly (in principle... in practice it's likely there are exact repeats but they should be few and far between).

If you have an idea of the type of background music you need, I can make other tracks too. I'd be happy to work with you on this.


Algorithmically-generated music. I think you could get some interesting results applying markov chains etc to music generation.

Perhaps some kind of "generative listening" too, taking existing music and adapting it to the listener. Like how a lot of AI art is some kind of "remix" of existing things.

Came here to mention generative.fm … it's great, been using it for years.

The creator, Alex Bainter[1], posts a lot of interesting/great stuff about generative music[2,3], and recently published the collection of music theory utilities he uses for generative.fm: https://github.com/generative-music/theory

[1] https://twitter.com/alex_bainter [2] Like this interactive "How generative music works" by Tero Parviainen: https://teropa.info/loop/#/itsgonnarain [3] Or his piece on corruption loops: https://corruptionloops.alexbainter.com/


Experimenting with generative music I put together an extremely simple (and ugly) prototype that only uses random generation (no machine learning of any kind) and very few rules; it is very basic but can sometimes produce things that could pass for elevator music.

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.

next

Legal | privacy