Acorn User


The BBC Micro Book: Basic Sound & Graphics

Author: Andrew Cryer
Publisher: Addison-Wesley
Machine: BBC Model B

 
Published in Acorn User #014

Fun In The Jungle

The BBC Micro Book: Basic Sound & Graphics

Before I opened this book, the cover made me feel it was going to be exciting. It portrays a damatically coloured jungle, with the Beeb zooming in like a flying saucer. The back cover states that the first part of the book teaches Basic in clear and simple terms and that the second part comprehensively covers graphics, animation and sound. This is exactly what the book does.

The book has a preface, an introduction, eleven chapters, ten appendices and an index. The introduction gives a glimpse of what the Beeb can do. Then come the first seven chapters which certainly do help the reader to get to know Basic.

Chapter 8 is on Teletext, Mode 7. It explains how to produce colour and graphics in this mode, and provides example programs. (It does, however, make the mistake of saying Teletext offers 80 x 75 block graphics. Since a two-block character space must be occupied by a code to switch on block graphics, Teletext offers a maximum of 78 x 75 blocks.) The book recommends Mode 7 for listing and editing programs generally - a good idea.

The last three chapters explain in detail how to produce your own graphics and sound. Chapter nine delves fairly deeply into graphics, showing how to take advantage of the Beeb's special features. Programs are provided which achieve interesting displays and anyone interested in Beeb graphics should benefit.

I was particularly interested in the claim: 'before too long, you'll be writing and listening to music'. Now I'm not particularly musical. I don't understand music and realised I was not making anywhere near full use of the Beeb's sound facilities. But this book really did help, and conveyed a feeling of confidence in the subject. The 40 pages devoted to sound made me feel that the authors really did understand music and how to use it on the Beeb. After reading it, I actually managed to get a tune out of my Beeb! I also enjoyed trying to imitate musical instruments. For me, this was no small achievement.

The title of the last chapter is animation, but it also includes various other programming aspects, such as programmable character and composite figures. It starts by discussing the principles of animation and then illustrates them through a program which bounces a ball around the screen. The chapter goes on to the idea of animation by redefining colours - well worth describing because of the smoothness of the resulting movement.

The ten appendices cover fifty of so pages. The first is concerned with editing programs. Appendix 3 deals with files: it describes saving and loading a program, how to create and read from files, and how to merge two programs. In my opinion, this was well done - much better than in the User Guide. Appendix 3 is on operator precedence in arithmetic expressions, while appendix 4 summaries mode and colour facilities. Appendix 5 explains bits, bytes and hex. Appendix 6 is on formatting for printing. Appendix 7 is concerned with character codes, special VDU codes, and Teletext control codes. Appendix 8 covers program efficiency, and demonstrates quite dramatically how a different algorithm can radically change the execution time of a program. Appendix 9 gives a list and brief description of all the BBC Basic keywords. Finally, the Operating System commands used earlier in the book are explained, and these are, in my experience, the most useful.

The book concludes with a six-page index - and I know I am not alone in regarding a good index as essential for any book to be used as a reference. Nevertheless, I am surprised at the number of computing books that don't bother to include one.

Now for some general comments. I liked the logical sequencing of the book and the way it is divided into sections, each covering two to three pages and typically containing an explanation of a topic, examples and exercises. I would imagine, though, that readers would prefer solutions to these exercises. The book is easy to read, with Basic, graphics and sound described clearly and simply. Text and examples back each other up so any points which may be difficult to follow in one, are invariably clarified by the other. Good use is made of diagrams, often showing the output from a program as a screen display.

Apart from the necessary description and examples of the GOTO statement, the book makes extensive use of both REPEAT...UNTIL loops and procedures. It therefore manages to eliminate GOTO statements completely, so demonstrating and encouraging structured programming. I was sorry that this important aspect of good programming practice was not stressed. It would have been nice to see the authors make this point.

Overall, I liked this book very much.

Andrew Cryer