Acorn Computers BBC Micro Model B w/8271 — Acorn BBC Micro Model B w/8271 User Guide Manual PDF

155 30 Sound The BBC Microcomputer contains integrated circuits specifically designed to generate musical sounds and noises on four ‘channels’. Two statements control the generation of musical sounds; they are SOUND and ENVELOPE . For simple effects the statement SOUND can be used by itself but if the user wishes to have greater control over the quality of the sounds generated then ENVELOPE can be used. At its simplest the sound statement is followed by four numbers, eg SOUND C,A,P,D C is the channel number 0 to 3 A is the amplitude or loudness 0 to -15 P is the pitch 0 to 255 D is the duration 1 to 255 The channel number C, determines which of the four ‘voices’ is to be used.

Channel 0 produces ‘noise’ (this channel will be explained in detail later) whereas channels 1, 2 and 3 produce purer notes. The amplitude, A, can be varied between 0 (off) and -15(loud). The pitch, P, selects notes in quarter semi-tone intervals. Middle C is produced when P is set at 52 and other notes are generated with the values of P shown in the table. As you can see the computer can produce notes spanning five full octaves. The values of P are also shown in the table for a stave in key of C but one octave up. The duration, D, determines the length of the note and is given in twentieths of a second.

Those used to reading music will find that music marked ‘Moderato =60’ will sound about right with the following settings for D.