Algorithmic Composition Final Project

Background

Being a hardcore gamer, I always know the importance of soundtracks in games. They not only create atmospheres suited for the games but also push the storyline forward.

Crypt of the NecroDancer, one of my favorite PC games, is the best (in my opinion) action game whose producer integrated music to the gameplay in a genius way. Here is a video that explains what I mean:

As you see in the video, you (so do the monsters) have to jump to the beats or you won’t be able to move or attack. The best about this game is that the supplementary role of music in most games changes to the primary. Even someone like me, who do no know sophisticated music knowledge can feel the power of music.

Thus for my final, I decided to combine music with the game together. Also, I believe that synth music is somewhat perfect for video games under the context that games are also “synthed”.

The project is still a work in progress, because of my limited knowledge of music theory. I’ll tell you my future development plan for the project in the last part.

The Game and Difficulties

I’ll show you the game first.

My original goal was for the user to create their own piece of music by playing the game. I planned to connect the synthesizer to the movement of the rocket. If the rocket hits the rocks, the music also changes.

For now, as you can see, I used a fixed BGM because I had trouble creating ear-pleasing beats, bass, chords and melodies. I couldn’t have them work them work in harmony. That’s an issue I’ll address in the next step of the project.

Tools

I mostly used three.js and p5.js for the game creation and tone.js for the synthesizing the music.

Tune.js

First I parsed the MIDI file into JSON format which is friendly to tone.js using a MIDI converter, so that I can get all the info I need, the pitch, time, duration, etc.

Then using the instruments in tone.js to present the music.

Further Development

There are a few steps that I would certainly try to improve the project.

The first is to create several original tracks for users to manipulate. The second is to find ways to better integrate music to the gameplay.

Leave a Reply