How to Make Original Sounds for Your Games

Back in the ’80s, I had a CBM-64 and knew all the poke values for the sound chips. I could make weird sounds in Basic Programs or from a low-level assembler. The CBM-64 had a fantastic three-channel chip that was used to great effect in many games.

While I’m not great at designing sounds, there are utilities and websites that can start nearly anyone on the path to becoming a Robert Moog or a Wendy Carlos, both famous synthesizer musicians. Both bfxr and as3sfxr let you export the waveforms generated as an uncompressed wav file that can then be turned into an MP3, ACS, or Ogg Vorbis and used in your game.

Both websites are based on an original program sfxr by Tomas Pettersson, a Swedish programmer and game developer. All three utilities (sfxr in C++, bfxr and as3sfxr in AS3) come with source code, so if you improve on them, please republish your source code.

As3sfxr is easiest to get into, but bxfr has a mixer for up to five sounds, so you can create some really interesting effects. You don’t have to be musical (I’m not!) to understand what these are about, but here’s a short overview on synthesizing sound through waveforms.

Simple waveforms have a shape that is defined by four parameters: ADSR (short for Attack, Decay, Sustain, and Release). The attack is when the sound rises from nothing to peak amplitude before decaying to a sustain level, which is then held until released. If this waveform is modified by an oscillator, you get even more interesting sounds. What distinguishes the twang of a piano string from the timbre of a trumpet is mainly this waveform shape.

These waveforms can be described by the shapes they resemble. Sine waves are fairly mellow sounding waveforms, while a triangle shape has harmonics built in, a sawtooth has more harmonics, and square waves have the most. If you apply filtering you can even get distortion effects, as this musical distortion primer shows. Try changing the LP Filter and HP Filter cutoff’s on as3sfxr to see the type of thing. Make sure you save your settings, as occasionally it will lock up, and you’ll need to reload the page.

If you are musical, then getting familiar with music generation is an opening to the games industry in composing, digital engineering, etc. I never had to create music or sound fx myself, but I saw it being done as I worked in the next room to David Whittaker, one of the best-known game music composers, for a few months back in the late 80s.

(Waveform image from Wikimedia).

Post a Comment

Your email address will not be published.