A common problem with music in games (and especially in smaller browser games) is that it tends to get repetitive very fast. You can’t afford to have staggering amounts of tracks and ambience because that would make the file size too large for  fast streaming or download.

So what is there to do? One idea David Orr and I had was to write a system that could handle smaller bits of music. Rather than have one 2MB track, we could have 6-7 300kB tracks that the game could arrange into a song procedurally. This means we can have a much larger variety of music for the same size. So we started to casually work on that system a year ago. I named it “Canary” because I like to name things after animals. Here is the technical description of the system from David:

“Canary” is a system Krin and I developed where the music is randomized in multiple layers, allowing for seamless, dynamic music that is constantly developing as the player progresses through the game. The System intelligently selects from a huge selection of audio “chunks” using a complex music theory and analysis system we created. Some of the features include:

Modulation — The system can change key, adding depth and variety to the music.

Musical Structure — “Canary” is able to move elegantly from quiet, atmospheric music to epic, driving music.

Fades — The system can control dynmics of the music, and fade in and out naturally to follow the gameplay.

Ensemble Diversity — “Canary” is capable of recognizing the different sections of the musical ensemble, and decides when instruments will be playing based on the musical structure.

You can sample a bit of it here: Canary Music Demo

Current the system selects from a pool of 72 different tracks. Each track is categorised as either melody, harmony, bass or percussion – and it can combine and mix these 4 ‘layers.’ The result is that we are able to turn these limited tracks into hours of flowing, unique music. But we also learnt that too much music causes a lot of ‘musical fatigue’ to the player, so we’ve also put in ample amounts of ambience to pace the songs.

We’re going to be using this system to run all of the music and ambience in Sinjid – but will probably continue to develop it further. Include things like parallel tracks (like when you go underwater in Mario 3D Land) and  entry / exit stingers so that we can end boss fights with a dramatic cadence. There is a lot more potential to be unlocked :)

18 Responses to Canary: Procedural Music System

  1. EvilNinjadude says:

    eeYES! eeYES! (C. Bison)

    All of my Yes.

  2. necrox22 says:

    gogoogogo beta

  3. igotnolife says:

    you guys could prob actually sell this or something, im sure people would want to buy it

  4. spatterlight says:

    this is looking really cool!

    are you guys planning on using this for all of your future games? that would be awesome!

    i was wondering, would this work for other sound bytes? perhaps what you can do is for each game, build a set of 72 different bytes that fit the mood of the game!

  5. darksouls says:

    wow great soundtrack! now im rlly pumped for the game

  6. Raron says:

    A really excellent and creative idea! I must say this thing really works well with games such as Sinjid and by the way, just heard the music and it is seriously beautiful. Can’t wait to play the game, and speaking of it, can we hope for the release of it’s soft version at least by this week?

  7. sinjid gamer says:

    hi great game and music can you tell me how you get all these creative ideas because every game made by you is *AWESOME*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

  8. sinjid gamer says:

    SRRY wanted to bold

  9. oshersz says:

    wow, this sounds complicated :o
    great to hear that the music system will be good!

  10. necrox22 says:

    ggogogogog sinjid editor :D

  11. Elsamu says:

    Man that sounds so cool. I can’t wait for the game to come out!!!!

  12. Shgamedude says:

    Hey krin, after you finish off Sinjid for PC and before you go on and start making Sonny 3 (can’t wait!), please at least consider putting Sinjid onto iOS. You can still charge premium in it.

  13. necrox22 says:

    krin, when you figure you’ll be ready to play??

  14. Charon says:

    This music system is so awesome, you should integrate it in all of your games. Or, better yet, licence it.

  15. k6ka says:

    holy crap man, amazing stuff you have there! can’t wait to see it become a household name!

  16. Alex Thy Noob says:

    Wow. this is a fantastic accomplishment, congradulations. I think you just revolutionized music for all indie games, incredible.

  17. Jarund says:

    Yes I think this is a really cool idea, the only small issue is that if the game makes a particularly epic track, because everything is randomized people would not be able to download that awesome track or be able to duplicate it. It might be possible if the system could record the choices it made and be able to play them back. Otherwise excelent

  18. Motear says:

    Is there any chance you could make flight available in the Google Play store for devices like the Galaxy S3,Galaxy Note 2, and the Samsung Galaxy Tab 10.1?

Leave a Reply

Your email address will not be published. Required fields are marked *