Procedural music generation

Community Forums/Showcase/Procedural music generation

GW(Posted 2011) [#1]
I wrote a program to procedurally generate music. It's very alpha atm but there are some samples online.
Let me know what you guys think.
Linky






.

Last edited 2011


SpaceAce(Posted 2011) [#2]
If those samples are "very early alpha," I think you're on to something. Some of the pieces you have on your website sound like they are about half way to being production-ready for space-shooters or side-scrolling platform games. I would really like to see more of this, I hope you follow up.

I think it would be awesome to have scripted music, where the user provides "rules" for a piece to be generated using a set of commands and modifiers.


grindalf(Posted 2011) [#3]
Thats pretty awesome :D


Gladclef - Ben B(Posted 2011) [#4]
Very nifty.
For some variation maybe consider phrasing the music, then throwing some double time/half time beats into the last couple of beats before the next phrase?


GW(Posted 2011) [#5]
Thanks,
Drum fills for transitions and chord alterations are planned.


Kryzon(Posted 2011) [#6]
Is the algorithm capable of generating bars in real-time? imagine how enthusiast it would be to have a game with 100%, never-ending procedural music (every level having its specific scale and configurations for variation, of course).


GW(Posted 2011) [#7]
Right now the program spits out a midi file.
If I knew how to generate & write the square/triangle/saw/noise samples to an audio buffer in real time then it could very much be continuous.
That could also enable real tempo changes which as of now it can't do.


Warner(Posted 2011) [#8]
That's really cool. What programming language? With Blitz3D, you could either use BlitzBass to write squares realtime or play MIDI instruments using Ziltch decls from the archive. BlitzMax may have more options than that.
I remember Mozart wrote a musical game where you generate a Menuet using dice. It is a fairly basic system, but it could be nice as a reference:
http://sunsite.univie.ac.at/Mozart/dice/


GW(Posted 2011) [#9]
It's written in bmax.
I'm currently looking into fmod to check the viability of pitch shifting samples and writing them to a buffer for output.
So far not much luck finding example code for that sort of thing.


DjBigWorm(Posted 2011) [#10]
The Music Sounds Great keep up the good work. Inspires me to work on my game which always seems to be missing music for the levels. hmmm, idea brewing will keep track of this:)


Gladclef - Ben B(Posted 2011) [#11]
If you know how long the output file will be, you could write your game to fork/exec the music generator halfway through the current midi file being played, then generate the new file with a command-line given file name.

Or, there's this:
http://www.blitzbasic.com/Community/posts.php?topic=42770#551247
sound in code :)
search for the label "Becky Roses wierd way of doing sound in code" or ".makesound"


mkg(Posted 2011) [#12]
Interesting. Have you ever looked at Paul Whalley's Tangent program? I looked into generative music apps some years back and that was the best one I came across. The main site seems to have disappeared but the demo should still be available from various download sites.