Procedural Ambient
category: general [glöplog]
Hi!
Several years ago, I studied computer music as an applied computer science subject. There I learned the mathematical history and theory of harmonicities, amongst other things, we did audio programming with PureData and Faust under linux, it's been fun, blabla. :)
Recently I've had the idea to create a realtime procedural ambient music generator. The main concept behind the idea is to use the disharmonicity function of Clarence Barlow. It's a function that takes an interval of two notes, and outputs how dissonant they are.
Now with a bit of random timers and more random magic, I pick a note that "sounds good" to the current sounding notes, start its playback, and periodically I remove notes that are getting too dissonant.
You can listen to this experiment here.
I'm curious, are there intros/demos out there that completely build up their music procedurally?
Several years ago, I studied computer music as an applied computer science subject. There I learned the mathematical history and theory of harmonicities, amongst other things, we did audio programming with PureData and Faust under linux, it's been fun, blabla. :)
Recently I've had the idea to create a realtime procedural ambient music generator. The main concept behind the idea is to use the disharmonicity function of Clarence Barlow. It's a function that takes an interval of two notes, and outputs how dissonant they are.
Now with a bit of random timers and more random magic, I pick a note that "sounds good" to the current sounding notes, start its playback, and periodically I remove notes that are getting too dissonant.
You can listen to this experiment here.
I'm curious, are there intros/demos out there that completely build up their music procedurally?
i guess debris
yes, ronny is a robot
frank sinistra
xTr1m, by the way, have a look at:
- https://kb.osu.edu/dspace/bitstream/1811/24080/1/EMR000008a-Cook-Fujisawa.pdf
- https://kb.osu.edu/dspace/bitstream/1811/24475/1/EMR000008d-Cook-etal.pdf
They expand the consonnance formulas to work on triads rather than just diads
- https://kb.osu.edu/dspace/bitstream/1811/24080/1/EMR000008a-Cook-Fujisawa.pdf
- https://kb.osu.edu/dspace/bitstream/1811/24475/1/EMR000008d-Cook-etal.pdf
They expand the consonnance formulas to work on triads rather than just diads
Hmm, I do not get any sound output here. Strange. I'd very much like to hear it though.
No output here aswell
I'm using XAudio2, maybe you should update your DirectX. Might also only work on Vista/Win7, can't test it on XP atm, sorry.
_-_-__: will take a look, thanks!
_-_-__: will take a look, thanks!
works here under xp sp3. I'd like to know more xtr1m, have you got any urls you can point me at. 2.3k? Does this mean the technique is unsuitable for 4k or is it just early days?
youtube or it didnt happen!
auld: It's early days, I'm using 3 threads: one to fill the small audio buffer of 64k floats, one for adding notes after waiting 200ms, and one for removing notes after waiting for a random amount of time. I didn't really optimize for size yet.
If you want to read more, I reccoment the text about Harmonicity here.
I suppose I can get this down to ~1.5-1.8k (audio only) after optimization and using one audio buffer of constant size with the waveOut API.
If you want to read more, I reccoment the text about Harmonicity here.
I suppose I can get this down to ~1.5-1.8k (audio only) after optimization and using one audio buffer of constant size with the waveOut API.
Works here but was a bit clicky for the first 4 seconds.
Sounds kind of soothing except for the harshness from higher pitched notes that sounds like aliasing. try using lowpassfiltered minblep saws.
Sounds kind of soothing except for the harshness from higher pitched notes that sounds like aliasing. try using lowpassfiltered minblep saws.
sounds a bit rough. Needs more filters, I guess :)
I'm using sines for the bass, triangles for the low mids, lowpass filtered saws for the high mids, and lowpass filtered pulses for the highs. I know, sound quality isn't top notch, and I don't want to debug the aliasing effects right now, this was just a proof of concept.
http://pouet.net/prod.php?which=5588
has procedural music
and if i remember correct, some of the tpolm musicians used a "pattern generator" for making drum pathes and import them to ft2
has procedural music
and if i remember correct, some of the tpolm musicians used a "pattern generator" for making drum pathes and import them to ft2
oh and i get no sound on the exe
there was this russian scener guy who coded some ambience-sound-generator in 2002 or so, what's his name. it sounded like horny insects singing mostly.
rowley: no, frank sinistra uses voice recognition stuff developed by microsoft :P
I would like to hear this experiment, because usually, procedurally generated music is rather.. well.
no sound here either. Win 7 x64
Try this:
http://www.pouet.net/prod.php?which=53916
I used there fractal notes generator - it sounds crap, but it is only 256bytes. This notes generator work like this.
A,B,C,D - notes
1. I hard coded patterns ex.:
A -> AABB
B -> ABCD
C -> ACCD
D -> AAAD
Now take random note, and denotes it using pattenrs. And so on:
A -> AABB -> AABB,AABB,ABCD,ABCD -> AABB,AABB,ABCD,ABCD,AABB,ABCD,ACCD,AAAD,AABB,ABCD,ACCD,AAAD -> ...
It is possible to set up these patterns in smart way, to make quite good melody.
http://www.pouet.net/prod.php?which=53916
I used there fractal notes generator - it sounds crap, but it is only 256bytes. This notes generator work like this.
A,B,C,D - notes
1. I hard coded patterns ex.:
A -> AABB
B -> ABCD
C -> ACCD
D -> AAAD
Now take random note, and denotes it using pattenrs. And so on:
A -> AABB -> AABB,AABB,ABCD,ABCD -> AABB,AABB,ABCD,ABCD,AABB,ABCD,ACCD,AAAD,AABB,ABCD,ACCD,AAAD -> ...
It is possible to set up these patterns in smart way, to make quite good melody.
For those poor souls who don't get audio from the EXE, I apologize, won't be submitting to youtube anytime soon.
And since I'm too lazy to fetch another software or code a wav-writer, here you are: 2 Minutes of procedural ambient recorded with Windows Sound Recorder.
And since I'm too lazy to fetch another software or code a wav-writer, here you are: 2 Minutes of procedural ambient recorded with Windows Sound Recorder.
More procedural mzk: http://www.pouet.net/prod.php?which=50524
didnt Spore have procedural ambient music made by Brain Eno? At least they made a big fuzz about it back then.
I also did something like that 10 years ago in 256b... Here's the source, you can play around with it in dosbox. One sequence of 16 notes is stored, the rest is predictively procedural, it repeats after 256 notes. It's not like Mozart wrote it, but back then this was enough to win the compo... Naive approaches (like random notes, or modulated by random etc.) can sound terrible... what worked for me is to store a short sequence and use simple 'composer' functions to expand it to a full song.
This disharmonicity function looks interesting and the result sounds nice, though these functions seem to be suitable for the >256b range only :) But I guess as soon as you set up an in-mem wav writer you'll be under 1.5k. Btw. I wonder what these functions say about some early 20th century or contemporary classical music with distorted harmonies... which actually sound interesting.
This disharmonicity function looks interesting and the result sounds nice, though these functions seem to be suitable for the >256b range only :) But I guess as soon as you set up an in-mem wav writer you'll be under 1.5k. Btw. I wonder what these functions say about some early 20th century or contemporary classical music with distorted harmonies... which actually sound interesting.