Click Here To Go To The Your Computer Archive



Written By N. Clarke


Cover Art
Click Here To Enlarge Loading Screen

Loading Screen
Click Here To Enlarge Opening Screen

Opening Screen
Click Here To Enlarge Screenshot

Game Screenshot

Wokstix

This program is an adaptation of the oriental rendering of the same name, presented some issues ago for the Enterprise computer. For the uninitiated, the computer is set to play, randomly, the black notes of the musical scales, on the grounds that the results are slightly more musical than a dawn chorus of tomcats.

For those unfamiliar with the BBC sound commands, a few notes will not be amiss. The main SOUND command is line 330, in the up-scale loop, and its identical twin in the down-scale loop is line 460. The BBC sound statement takes the form:

SOUND control, amplitude OR envelope number, pitch, duration

and in the program a typical line is:

330 SOUND &0201,V1,B(N),D1*A

The Lost Chord

Control
The first of the four digits is zero, indicating that new notes have precedence over old; in other words the old note is cut short by the new note. The second digit, a 2, indicates that the sound can begin only when information from two other channels has been received. This information will be delivered by subsequent program lines. The third digit must be zero; a 1 will affect the sound adversely on the other channels. The fourth and final digit identifies which of the three sound channels is being used by the statement.

Amplitude
Negative numbers represent volume, -15 is the loudest. A positive number 1, 2 or 3 indicates that an envelope, specified elsewhere in the program, is being applied to this particular sound channel.

Pitch
The pitch of the note is given by B(N) and is one of the values extracted from the pitch table in DATA lines 150-190. The program is not set to use the high-sounding notes on DATA line 190, though they could be used if RESTORE 150 were to be changed to RESTORE 160. The high pitch values in DATA line 180 are used in association with a simple chord mechanism.

Duration
The duration of the note is set to various values in line 110; for example, D1 at 10 is loud enough for the melody notes on channel one. The duration is modified later in the SOUND statement by multiplying it by A, where A is randomly set to 1, 1.5 or 2.

The chord note is sounded by the second sound channel - see lines 350 and 480. Those lines make available a note which is two or three sharps higher than the melody note, thus providing the means of forming a simple chord. That, however, is not sounded on every note but only on occasions which are determined by the random factor of the preceding lines 340 and 470. When a chord is not required - which, in this program, is 65 percent of the time - L is set to zero rather than 1 and the chord-note is thus turned off.

The third channel is used for experiments with envelopes. Envelope 3 is set up in line 102. V3, the volume variable for channel three, is set to 3 to indicate that the channel is subject to whatever volume the envelope imposes on it. The envelope shape is complicated to set up - consult the BBC handbook if you want to alter it. If the volume is not to your liking, it can be adjusted by altering the last two numbers shown in line 102.