Liber VI

The music

From the Spectrum's AY chip to the Atari's TIA.

The music of the original game

La Abadía del Crimen (The Abbey of Crime) has no soundtrack composed for it. According to the Wikipedia entry, it included music from Bach's Notebook for Anna Magdalena Bach and the Flute Sonata BWV 1033, as well as Crystal Palace by the band Gwendal. The PC version added a short arrangement of Schubert's Ave Maria, which played during Mass.

The music of the introductory parchment is the Minuet in G minor from the Notebook for Anna Magdalena Bach, BWV Anh. 115, not its better-known neighbor, the Minuet in G major (BWV Anh. 114). Like other minuets in the notebook, it is now attributed to Christian Petzold rather than to Bach himself.

In the ZX Spectrum 128K version, the music comes out of the AY-3-8912 sound chip, which has three tone channels and one noise channel.

Time in the abbey

The days are divided into the canonical hours, and Brother William has to be at Mass and in the refectory when the bell rings. The bell is the audible signal that orders the day.

The analysis of the Spectrum's sound player turns up tunes that are triggered from the game's event scripts. One of them, nearly eight seconds long with two voices alternating, is the bells that ring at the start of Prime, Sext and Vespers (you can hear them below).

What has been measured is the background music of the game proper. It lasts 20.5 seconds, loops, and does not start until some effect has played on the third channel, such as a footstep or a voice beep.

How it sounds in the demake

The Atari 2600 has no dedicated sound chip like the Spectrum 128K's AY: sound comes from the same chip that draws the screen, the TIA, which offers only two simple, very limited tone channels. To reproduce the AY's three voices, the demake's ROM uses a different method: a small software synthesizer that writes a 4-bit sample to the volume register AUDV0 on every scanline. That makes 262 samples per frame at 60 Hz, or 312 in PAL at 50 Hz: a digital wave of about 15.7 kHz that mixes the AY's three voices. The voices are added as they are, without centring or filtering, and noise too high-pitched for that rate is replaced by its average, which is how the ear hears it. Each square wave is not taken at a single point of the line: it counts the part of the line during which it is high, a box filter that keeps the highest harmonics from folding back into false tones, which with the vibrato of the background music sounded like a noisy echo. If the three voices together do not fit in the 4 bits, the gain drops instead of clipping, like a limiter, and recovers slowly, in about a second, so that each bell stroke dies away before the next. And since the TIA's output does not grow in a straight line with AUDV0, the sum goes through a 64-entry table that picks the value that sounds closest to the right one.

The original music runs at 50 frames per second and the console outputs 60. At first, the synthesizer advanced the music on five frames out of every six, and every note change fell at the start of a frame, up to 1/60 of a second off. Now each step of the music is placed at its exact instant: the synthesizer splits the frame's 262 samples at the right point and changes the AY registers there, so the rhythm is the original's. In 50 Hz PAL this is not needed, because each step falls right at the start of a frame. The 2600 imitations you can hear below already sound like this.

The in-game tunes are not stored as recordings. The Spectrum's player is a score interpreter, and the demake keeps that approach: the 11 tunes and effects fit in 506 bytes of scores and envelopes, plus a player of about 1.4 KB of code. The intro and the final parchment are stored differently: as the sequence of changes to the AY registers from frame to frame, compressed with a custom LZ77 scheme that is decompressed on the fly. That brings the intro down from 2.9 KB to 1.4 KB and the ending from 11.6 KB to 3 KB.

Listen and compare

Each piece comes in two versions: the Spectrum's AY and an imitation of the 2600's synthesizer. Both are generated from the same AY registers, dumped with the project's Spectrum emulator. The AY version uses a minimal synthesizer, with square waves and no envelope; the 2600 version reproduces the full integer arithmetic of the ROM's synthesizer. They are not recordings of a real console or a real Spectrum.

Below each audio, an oscilloscope draws the wave as it plays, calculated from those same registers. On the Spectrum you see the AY's three channels, A, B and C, separately, each with its square wave. On the 2600, the single signal that reaches the AUDV0 register: the three voices already added together, one 4-bit sample per screen line, hence the steps.

Intro and title screen

The piece that plays with the opening parchment: the Minuet in G minor, BWV Anh. 115. It lasts 61 seconds.

ZX Spectrum 128K · AY
Intro, AY version.
Atari 2600 · TIA
Intro, imitating the 2600 synthesizer.

Background music of the game

A fragment of Crystal Palace, by the French band Gwendal, in a 20.5-second cycle that repeats while you play. Below, the original recording.

ZX Spectrum 128K · AY
Background, AY version.
Atari 2600 · TIA
Background, imitating the 2600 synthesizer.
Crystal Palace, by Gwendal: the original recording.
Audio: Gwendal on YouTube

The bells

Two voices alternating for 7.8 seconds. They ring at the start of Prime, Sext and Vespers.

ZX Spectrum 128K · AY
The bells, AY version.
Atari 2600 · TIA
The bells, imitating the 2600 synthesizer.

Final parchment

The music at the end of the game. It lasts 89.6 seconds and loops.

ZX Spectrum 128K · AY
Ending, AY version.
Atari 2600 · TIA
Ending, imitating the 2600 synthesizer.

Audio credits

The recordings on this page are the project's own captures from its emulator, converted to mono MP3. The music and arrangements of the original game belong to their rights holders, and the source compositions to their authors or heirs. The excerpts are offered as material for technical comparison in a non-profit tribute.

Sources: La abadía del crimen, Wikipedia; Spectrum Computing entry; project documentation.