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

318 To play the chord of C major which consists of the notes C, E and G for two seconds you could enter 100 SOUND 1,-15,52,40 110 SOUND 2,-15,68,40 120 SOUND 3,-15,80,40 However to play a number of notes in succession you would enter 100 SOUND 1,-15,96,10 110 SOUND 1,-15,104,10 120 SOUND 1,-15,88,10 130 SOUND 1,-15,40,10 140 SOUND 1,-15,68,20 which plays a well-known film theme. The duration (D) can have any value between -1 and 254. Values in the range 0 to 254 give a note duration of that number of twentieths of a second. Thus if D=40 the note will last for two seconds. Setting D=-1 means that the note will continue to sound until you actually take steps to stop it.

You can either press the ESCAPE key or stop it by sending another note, to the same channel, which has ‘flush control’ set to 1 – see later in this section. As was mentioned earlier, channel number 0 produces ‘noises’ rather than notes and the value of P in the statement SOUND 0,A,P,D has a different effect from that described for channels 1, 2 and 3. Here is a summary of the effects of different values of P on the noise channel: P Effect 0 High frequency periodic noise. 1 Medium frequency periodic noise. 2 Low frequency periodic noise. 3 Periodic noise of frequency determined by the pitch setting of channel 1. 4 High frequency ‘white’ noise. 5 Medium frequency ‘white’ noise.

6 Low frequency ‘white’ noise. 7 Noise of frequency determined (continuously) by the pitch setting of channel 1. Values of P between 0 and 3 produce a rasping, harsh note. With P set to 4 the noise is like that produced by a radio when it is not tuned to a station – a sort of ‘shssh’ effect. P=6 sounds like the interference found on bad telephone calls. When P is set to 3 or 7 then the frequency of the noise is controlled by the pitch setting of sound channel number 1. If the pitch of channel 1 is changed while