Skip to content

Chiptunes

10 November 2010

This is the name for music made with old computers and game devices, or music that emulates those sounds.

Historical

Atari

The first home computer game was Pong, which came out in 1972. In 1977, the same company, Atari, launched a home game computer called the VCS. This computer was later re-named to the Atari 2600. The TIA chip in that computer had two audio voices with separate waveform and volume settings for each. In 1980, a piece of software was released for the Atari 400/800, called the Atari Music Composer, which made composition possible for home users. However, most of the more interesting music was being written for a different platform.

C64

In 1982, another 8 bit computer, the Commodore 64 was launched. It was originally intended to be a business computer and designed to compete with the x86-series of computers (this kind is better known now as the PC). The sound chip was especially a selling point for home users.

The SID chip had 3 channels of audio, each of which had an ADSR envelope and ring modulation. The oscillators had a range of 16-4000Hz and could output sawtooth, triangle, pulse waves or noise. The oscillators were routed through a filter, which could act as a highpass, lowpass, band pass or notch filter. It was possible to get a fourth audio source, but using an “undocumented feature” to output 4 bit samples. This worked better on some version of the chip than others.

This chip is still popular with music makers. In 1997, a synthesiser called the SID Station came out, which used these chips. By then, they had been out of production for years.

The designer of the SID was given vague instructions and thus had a lot of freedom. He designed the best chip that he could. Later, he went on to found the Ensoniq synth company.

During the 80’s, the best known SID composer, who inspired many of his contemporaries, was a British man named Ron Hubbard. We listened to Monty on the Run, which many people consider to be his best composition. You can download the SID file of this piece from demovibes. We also listened to the piece he thinks is his best, W. A. R., which you can download from here.

In order to play these files, you need a SID emulator. I used one called SIDPLAY. This player also downloads a vast library of canonical SID pieces. However, the file format dates back to a time when disk space was a precious commodity, so each of the files takes up 8k on my disk!

The best known SID composer now is Martin Galway, who is from Belfast. He composed for multiple platforms, including the C64 and the Sinclair ZX Spectrum. We listened to music he wrote for Cosmic Bakery. He was the first SID composer to release a piece using samples, which was for Arkanoid. Both of those pieces are included in the library that comes with SIDPLAY.

Demoscene

One habit of users then, as now, was getting around DRM restrictions on games. Groups of hobbyists would crack games and share them. They started doing splash screens, taking credit for the crack. Over time, these splash screens got more and more elaborate and started having sound and graphics. Eventually, some groups focussed mostly on the splash screens, and dropped the attached cracks. These sound and animation displays were called demos and the social interactions that surrounded this was called the demoscene.

Demoscene artists were competitive, wanting to display their own skill and the power of their preferred platform. There were social events called demoparties, where people would share their demos and important programmers would display their work on projectors in front of an audience. This scene was largely based in Europe.

Current

The chiptune scene has since migrated to the web, where there are many communities, including Micromusic, the 8 Bit Collective, 8 bit peoples and Greyscale. These communities share tools and mp3s. Some of them are based on the idea of openness and are in the FLOSS scene or embrace many FLOSS ideals.

Micromusic isn’t solely chiptune music, but does chip style and lo-fi. They host music that sounds like old game music, even if ti’s made with more modern means. One of the founders of Micromusic is Emma Davidson, who publishes music as Lektrogirl. We listened to her piece –Gang Girlz, which you can download from the sidebar of her blog.

Another interesting Micromusic composer is Psilodump. We listened to The Somnambulist, which you can download from Last.fm

Greyscale is a polish chiptune collective which has an interest in the Atari 2600. This platform seems to have more new music circulating the internet than it has original game music being traded. We listened to X-Ray’s track Zizibum, downloaded from Greyscale

The ZX Sinclair also has current practitioners, including the ZX Spectrum Orchestra. We listened to Hung Up by the AY Riders. AY was the name of the sound chip in the Spectrum. Those computers down have a way to sync to each other, so when the AY Riders play, the use 2-4 machines which they have no way to sync up. Instead, they make sure they program the right timings and just try to start everything going at around the same time.

The ZX Spectrum is programmed with BASIC, so modern chiptune composers who want to use this platform will learn BASIC.

Handheld Devices

Pixelh8, a British composer, wrote software for the Gameboy and the Nintendo DS, to allow users to make Chiptunes. We listened to Game Boy Meets Game Girl.

lo-bat., a Belgian composer, also works with handheld devices. We listened to Twinkle, downloaded from his website. He’s a big proponent of the Creative Commons license, and posts his music to his website for free download. The band Crystal Castles misunderstood this license and used some of his work without asking permission, which caused a scandal.

With other Instruments

Some bands use chiptunes as a piece of music using other instruments. One example of this is a band from Birmingham called the 8 bit Ninjas. We listened to Push It.

Source for much of the information above from Flat Four. The transcripts are interesting and the podcasts have great musical examples.

How to make Chiptunes

There’s a long section on this in the interview with a chiptune artist. You can also make lo-fi sounds with other tools. If you use square waves, or other period waveforms you can get a chiptune-like sound. Also, limiting to two or three voices and using only synthesis methods found in the older chips, like ring modulation, for example.

You can kill bit depth, to make an old-style sound. In Supercollider, you can do that with a Mantissa Mask. Let’s say you have a sawtooth wave and you want to make it 8 bit:

SynthDef(\EightBitSaw, {|freq = 440, dur = 1, amp = 0.2, out = 0|

	var osc, env, mask;
	
	env = EnvGen.kr(Env.linen(dur * 0.1, dur * 0.8, dur * 0.1, amp, 0), doneAction: 2);
	osc = Saw.ar(freq, env);
	mask = MantissaMask.ar(osc, 8); // make 8 bit	
	Out.ar(out, mask);
}).play

Bitcrushing

You can also use bitcrushing techniques, like using round. If you round(0.1), then the waveform can only have values that are multiples of 0.1. If you have a signal going from 0 to 1, it will start at 0, go to 0.1, then to 0.2, etc, with no values in between.

SynthDef(\RoundedSine, {|freq = 440, dur = 1, amp = 0.2, out = 0|

	var osc, env, mask;
	
	env = EnvGen.kr(Env.linen(dur * 0.1, dur * 0.8, dur * 0.1, amp, 0), doneAction: 2);
	osc = SinOsc.ar(freq, 0, env).round(0.1);
		
	Out.ar(out, osc);
}).play

It can sound good to combine either of these methods with Latch.ar. This is a sample and hold function. If we trigger it at half the sample rate, we hold every other sample. This effectively cuts the sampling rate in half:

SynthDef(\LatchedSaw, {|freq = 440, dur = 1, amp = 0.2, out = 0|

	var osc, env, latched;
	
	env = EnvGen.kr(Env.linen(dur * 0.1, dur * 0.8, dur * 0.1, amp, 0), doneAction: 2);
	osc = Saw.ar(freq, env).round(0.1);
	latched = Latch.ar(osc, Impulse.ar(SampleRate.ir / 2));
	Out.ar(out, latched);
}).play

Ring modulation, one of the things allowed by the C64, is when we vary the amplitude of one signal by another. Remember that with the C64, each oscillator had it’s own envelope:

SynthDef(\RingSine, {|freq1 = 111, freq2 = 440, dur = 1, amp1 = 1, amp2 = 0.2, out = 0|

	var osc1, osc2, env1, env2;
	
	env1 = EnvGen.kr(Env.linen(dur * 0.1, dur * 0.8, dur * 0.1, amp1, 0), doneAction: 2);
	env2 = EnvGen.kr(Env.linen(dur * 0.1, dur * 0.8, dur * 0.1, amp2, 0));
	
	osc1 = SinOsc.ar(freq1, 0, env1);
	osc2 = SinOsc.ar(freq2, 0, osc1) * env2;
	Out.ar(out, osc2);
}).play

Speaking of envelopes, we’ve been using linear, fixed duration envelopes in this sample. Proper ADSR envelopes are Pbind-ready:

SynthDef(\RingSineGated, {|freq1 = 111, freq = 440, gate = 1, amp1 = 1, amp2 = 0.2, out = 0|

	var osc1, osc2, env1, env2;
	
	env1 = EnvGen.kr(Env.adsr(0.1, 0.01, amp1, 0.5), gate);
	env2 = EnvGen.kr(Env.adsr(0.2, 0.1, amp2, 0.1), gate, doneAction: 2);
		// with ring modulation, it doesn't matter which envelope gets the doneAction
	
	osc1 = SinOsc.ar(freq1, 0, env1);
	osc2 = SinOsc.ar(freq, 0, osc1) * env2;
	Out.ar(out, osc2);
}).add;

Pbind(
	\instrument,	\RingSineGated,
	\freq,		Pseq([440], 1),
	\freq2,	111,
	\amp1,	1,
	\amp2,	0.2,
	\dur,		1
).play

The timbrel possibilities of doing C64-like sounds are fairly extensive!

From → electronica

One Comment

Trackbacks & Pingbacks

  1. Dub Patch and Timing « Notes for my Classes

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: