BBC Micro Music Masterclass
In this chapter we shall explore some of the possible applications of our expertise with SOUND and ENVELOPE. Many uses have already been covered in earlier chapters so in the following pages I shall restrict myself to what can best be described as ‘more developed programs’ than those listed to date.
Apart from a few exceptions, the programs we have looked at up till now have been stripped down to their basic components. For example, our use of graphics has been purely functional, and many routines which would certainly have to be included in any program intended for serious applications have been omitted. The main category of omissions in this area come under the general heading of ‘Idiot Trapping’ routines, routines which are intended to prevent a program crash when a wrong key is hit accidentally.
The programs which follow now are immune to all but the most determined ‘Idiot’ who is going to press <BREAK> or <ESCAPE> come hell or high water! I could, of course, have disabled these keys too. Programming the <BREAK> key to list the program is accomplished by the simple expedient:
*KEY 10 OLD M LIST M <RETURN>
We could equally well program the key to re-enter the program at the <BREAK> point. To disable the <ESCAPE> key we use the *FX command *FX 229,1. To re-enable this key you only need to type *FX 229,0.
Nevertheless, all misgivings pushed aside, idiot trapping of this type has been left out - as a result the programs are more easily keyed-in and do not become over-long.
The programs in this section are not arranged in any particular order so I would suggest that you look through, and then start with whichever one most takes your fancy. The ‘Patriotic Program’ plays a stirring three-part version of ‘Rule Britannia’ while hauling a Union Jack up and down a flag pole. ‘Clypso 2’ is an autocomposition program with, appropriately enough, a distinctly Caribbean feel. The ‘Chord Organ’ program is a short routine which lets you play three-note chords by pressing keys on the keyboard. ‘Multi 1’ (courtesy of Igor Thomas), on the other hand, is a neat