Procedural music?

Subscribe to Procedural music? 6 posts

avatar for BobJanova BobJanova 852 posts
Flag Post

I’ve got a game idea whereby the player’s actions affect the sound experience, and you get bonuses (e.g. stronger attacks, bigger jumps etc) for hitting the beat. This would require the ability to dynamically generate music, and I’m wondering if anyone has experience or tips for that. I’m thinking of light rock type music (percussion, chord based guitar/bass and some melody instruments).

 
avatar for BobTheCoolGuy BobTheCoolGuy 3750 posts
Flag Post

Do you mean generate completely, as in write the binary data as the game flows, or just combine prerecorded sound clips and such?

 
avatar for alecz127 alecz127 817 posts
Flag Post
Originally posted by BobTheCoolGuy:

Do you mean generate completely, as in write the binary data as the game flows, or just combine prerecorded sound clips and such?

hopefully he means the latter : \
If not, I pat him on the back warmly and silently think that if hes asking he probably won’t be able to do it for a year or two of hard work.
If he does mean the latter, that sounds simple enough! Just using a few random functions and arrays that hold the sound clips to be played under a certain amount of randomness.

The hard part would probably be getting it to work quickly (vectors maybe?) and probably lower quality sound clips, probably of a certain file type?
Other than that, just messing with how random it is to get the music to sound not awful everytime.

The end result would be quite amazing if done properly.

 
avatar for BobJanova BobJanova 852 posts
Flag Post

I was thinking of generating a MIDI type track, generating musical notes on a few ‘instruments’, which I’d have samples for.

 
avatar for Draco18s Draco18s 6860 posts
Flag Post
Originally posted by BobJanova:

I was thinking of generating a MIDI type track, generating musical notes on a few ‘instruments’, which I’d have samples for.

Get familiar with Rule 30

 
avatar for BobJanova BobJanova 852 posts
Flag Post

Hm, the dynamic sound API has a latency of about a quarter of a second, on my machine at least. I’m going to have to think of a good mechanism for the player’s actions to have effect over a longer time period. Either that or embed all the notes I want as MP3s and not use dynamic sound, but I’ve got some nice clip pipelining using that.