False Echo is a music playback program that reads note data from DATA statements and plays it using the SOUND command, available on the Timex Sinclair 2068. Each note is encoded as a triplet: a register-1 value (pitch high byte), a register-0 value (pitch low byte), and a duration multiplier. The program uses the AY-3-8912 sound chip’s registers directly — register 7 controls the mixer, register 8 sets the volume, and registers 0/1 set the tone period — to produce a melody with smooth note transitions. Silence/pause events are encoded with the special value 254, which lowers the volume and skips the SOUND note command, while value 255 terminates playback entirely. The piece was written by Kristian Boisvert and published by Byte Power in 1986.
Program Structure
The program is a simple sequential loop with no subroutines. Its logical flow is:
- Lines 20–25:
DATAstatements holding the note stream as triplets. - Line 30:
READ a,b,c— fetch the next triplet fromDATA. - Line 40: Termination check — if
a=255,STOP. - Line 50: Silence/pause check — if
a=254, lower volume and skip to duration. - Line 60: Play the note via
SOUND. - Line 70: Post-note volume shaping.
- Line 80:
PAUSE c*10for note duration. - Line 90:
GO TO 30— unconditional loop back.
Data Encoding
Every note is stored as a three-value triplet (a, b, c):
| Field | Variable | Meaning |
|---|---|---|
| 1st | a | AY register 1 (tone period high byte), or 254 = pause, 255 = end |
| 2nd | b | AY register 0 (tone period low byte) |
| 3rd | c | Duration multiplier (PAUSE = c×10 frames) |
The terminator triplet is 255,0,0 and silence events use 254,0,n. This is a compact encoding: two bytes define the 12-bit tone period for the AY-3-8912, and the third controls timing.
AY-3-8912 Register Usage
The SOUND keyword on the TS2068 maps directly to AY-3-8912 registers. The program uses four registers:
SOUND 7,62— Register 7 (mixer): value 62 (%00111110) enables tone on channel A only, disabling noise and other channels.SOUND 8,15— Register 8 (channel A volume): set to maximum (15) before the note pitch registers are written.SOUND 1,a— Register 1: tone period high byte (from triplet fielda).SOUND 0,b— Register 0: tone period low byte (from triplet fieldb).
After the note is set, line 70 issues SOUND 8,13 to reduce volume slightly from 15 to 13, creating a minor envelope effect that softens the tail of each note — the “false echo” of the title.
Notable Techniques
- Chained SOUND parameters: Line 60 uses semicolons to set registers 7, 8, 1, and 0 in a single statement (
SOUND 7,62;8,15;1,A;0,B), which is more efficient than four separate calls. - Volume-based articulation: The step-down from volume 15 to 13 after each note, and a further drop to 10 during pause events (line 50), simulates a crude amplitude envelope without needing the AY’s hardware envelope generator.
- Pause event design: Using the sentinel value 254 in the same
afield as pitch — and usingGO TO 80to skip the SOUND note command — keeps the data format uniform (always three values) while cleanly handling rests. - Duration scaling:
PAUSE c*10maps small integers in the data to 50Hz frame counts (e.g.,c=1→ ~0.2 s,c=4→ ~0.8 s), giving convenient granularity without large DATA values.
Content
Source Code
10 REM FALSE ECHO WRITTEN BY KRISTIAN BOISVERT ©1986 BYTE POWER
15 REM DATA FOR MUSIC
20 DATA 4,92,1,254,0,1,3,117,1,2,232,1,254,0,1,3,117,1,3,68,1,254,0,1,3,117,1,3,226,1,254,0,2,3,226,1,254,0,1,3,68,1,3,68,1,254,0,1,3,226,1,3,117,1,254,0,1,3,226,1,4,92,1,254,0,2
25 DATA 4,92,1,254,0,1,3,117,1,2,232,1,254,0,1,3,117,1,3,68,1,254,0,1,3,117,1,3,226,1,254,0,2,2,232,1,254,0,1,2,232,1,2,232,1,254,0,1,3,68,1,3,117,1,254,0,1,3,226,1,4,92,4,255,0,0
26 REM READ NOTES
30 READ a,b,c
35 REM A=255 THEN MUSIC STOPS!
40 IF a=255 THEN STOP
45 REM PAUSE?,LOWER VOLUME AND GOTO LINE 80 (DURATION)
50 IF A=254 THEN SOUND 8,10: GO TO 80
55 REM PLAY NOTE!
60 SOUND 7,62;8,15;1,A;0,B
65 REM LOWER VOLUME FOR SMOOTHER DELIVERY
70 IF A<>254 THEN SOUND 8,13
75 REM DURATION OF NOTE
80 PAUSE C*10
85 REM COMPLETE LOOP
90 GO TO 30
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.
