I Made a Synth Keyboard

Just for fun, I made my own synthesizer keyboard app for the iPad and iPhone. It’s all homebrew stuff. I created my own oscillator and ADSR envelope routines and just rely on the OS for audio sample callbacks. It can play back any of the following waves: sine, square, triangle, sawtooth, pulse, and noise. If you’re familiar with old-school game and computer systems, like the NES and C64, you’ll recognize some of these sounds.

I’ve previously demoed the synth music player, which uses tracked files for note playback. This is the first time I’ve hooked up the synth code to a UI system so that you can play music directly.

This keyboard runs on iPhone and iPad. Here are a couple of screenshots.

iPhone:

Photo Apr 23, 11 07 17 PM

iPad:
Photo Apr 23, 23 06 09

And here’s a demo of me playing with the app on the iPad:

How limited audio chips led to beautiful music

Limitations in the physical world often lead to great innovations. There’s something about constraints that forces us to find ways to come up with creative solutions. In the 1980s, audio chips for game and computer systems were limited to producing synthetic audio with just a few parameters. Using these chips in their standard way would lead to a boring, lifeless synthetic sound. However, developers found ways to produce new and interesting soundscapes with such limited hardware by using the chips in ways that perhaps weren’t originally intended.

The video below gives a comprehensive summary of the techniques used by developers in the 1980s to produce computer-based music (i.e. chip music, or chip tunes) for games.

If the above video fascinates you and you’d like to try your hand at creating C64-style music today, I recommend you download GoatTracker. The instructions that come with it are a little cryptic, so I recommend reading through this instead.

I’m currently in the process of adding synthetic audio to my game engine. I’m going to incorporate much of the ideas in the above video to produce as authentic an 8-bit sound as I can. To see what I’ve got so far, check out the following video: