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

319 channel 0 is generating noise then the pitch of the noise will also change. The program below generates a noise on channel 0 and varies the pitch of the noise by changing the pitch of channel 1. Notice that the amplitude of channel 1 is very low (-1) so you will hardly hear it – but you will hear the noise on channel 0. 100 SOUND 0,-15,7,150 110 FOR P= 100 TO 250 120 SOUND 1,-1,P,1 130 NEXT P Notice that we have not yet described how sounds can be affected by a superimposed envelope. An envelope can affect both the pitch and amplitude of a note as it is playing.

Thus the statement SOUND 1,-15,255,255 merely plays a continuous loud note, but ENVELOPE 1,1,-26,-36,-45,255,255,255,127,0,0,- 127,126,0 SOUND 1,1,255,255 produces a complex sound controlled largely by the envelope See the keyword ENVELOPE for more details. As mentioned briefly at the start of the description of the SOUND statement, the channel number, C, can be given values other than 0,1,2 and 3. You do not need to understand exactly why the following works to use it! For C you can write a four figure hexadecimal number to achieve certain effects – for example: SOUND &1213,-15,52,40 The first parameter in the above example has the value &1213 .

The ampersand ( & ) indicates to the computer that the number is to be treated as a hexadecimal number. The four figures which follow the ampersand each control one feature. In this new expanded form the SOUND statement looks like SOUND &HSFC,A,P,D and the functions H, S, F and C will be explained in turn. In essence these numbers enable you to synchronise notes so that you can play chords effectively. The first number (H) can have the value 0 or 1. If H=1 then instead of playing a new note on the selected channel, the previous note on that channel is allowed