Gary Herman creeps up stealthily on the latest from Camputers
Despite a good deal of high-octane publicity, Camputers' Lynx computer has crept into the market-place almost as stealthily as its namesake. The 48K machine was late in arriving and the 96K version only became available towards the end of last year. Owners and potential owners are still waiting for many exciting add-ons and extras promised before the machine was unveiled.
At an asking price of £299 I expected more from the Lynx than it actually gave me. This is a shame, because the machine is home-grown and in some respects extraordinarily versatile. But first, the beefs. The keyboard and case felt cheap — although the keyboard is full-size. The machine sports an RS232 serial interface but no facility for parallel printers (although there is an expansion port). Maddeningly, the screen display does not scroll — instead it is paged so that print, listings and displays are overwritten once the bottom of the screen is reached. There is no on-off switch and no reset button to cope with not-infrequent crashes. The screen-editing facilities are, at best, curious and, at worst, exasperating.
Lynx BASIC is clearly based on the BBC computer's version of the language. It contains one or two glaring omissions but is, in some ways, an improvement on the BBC, with lots of scope for structured programming (REPEAT... UNTIL and WHILE... WEND as well as the usual IF... THENs, GOTOs, GOSUBs and procedures). Output and input to and from the real world is well catered for, graphics are easy to handle (and probably as versatile as the BBC's) and, while there is no assembler as with BBC BASIC, the Lynx is unparalleled in its machine code features, which include a comprehensive monitor accessed by the BASIC command MON, and the facility to store machine code in and call it from BASIC programs using the CODE, CALL and LCTN commands.
This machine code feature (combined with the input-output routines) makes the Lynx a serious proposition for anybody interested in using a micro for control applications. This includes musicians wishing to interface computers with synthesizers and drum-machines. Unhappily, however, as a stand-alone musical instrument the Lynx is really a non-starter.
Sound is produced through an onboard loudspeaker — there is no audio output — using direct synthesis techniques. There is no dedicated programmable sound generator, but audio signals are produced by digital-to-analogue conversion. There is only one channel and no specific noise facility.
That said, the Lynx's sound generation features allow plenty of fruitful experiment for those interested in direct conversion. Unlike the similar system used in, say, the Spectrum, the Lynx's sound generation can actually produce music — and, in theory, a lot else — at an audible volume.
The simplest method involves the use of the BASIC command BEEP (there is one other BASIC command, SOUND, which we'll come to shortly). BEEP is followed by three parameters: the first specifying wavelength (between 0 and 65535 — although anything above about 2000 gives a low frequency which begins rapidly to resemble a series of clicks); the second specifying the number of cycles in the sound (also between 0 and 65535); and the third specifying a volume between 0 (off) to 63 (loudest). The volume setting means that BEEP can produce enveloped sounds:
10 FOR Y = 63 TO 0 STEP -1
20 BEEP 100, 2, Y
30 NEXT Y for example.
BEEPs can also be generated by toggling the loudspeaker using the output command from a BASIC statement:
10 FOR X = 63 TO 0 STEP -1
20 OUT (&80), 1
30 OUT (&84), X
40 PAUSE 50
50 OUT (&84), 0
60 PAUSE 1
70 NEXT X
or by using machine code.
First of all, clear some memory by typing RESERVE &A000 — the & indicates a hexadecimal number — then call the monitor by typing MON. Now type M A000 to get to the beginning of the machine code routine and enter the routine, thus:
A000 21 F0 00
A003 11 F0 00
A006 06 3F
A008 3E 01
A00A D3 80
A00F C3 4E 09
The hexadecimal numbers A00N are memory locations and all the other numbers are the instructions to the microprocessor (a Z80) entered in memory. The two sets of F0 00 specify the number of cycles and the wavelength (&00F0, which is 240 in decimal notation).
The 3F specifies volume (&3F equals 63). This machine code routine is equivalent to the BASIC statement BEEP 240,240,63. It can be stored in a BASIC program using the CODE command or entered direct (as above) and called using the BASIC statement CALL &A000. Volume data is kept in the Z80 in register B (06 3F means load register B with the number 63), so an envelope can be created by incrementing or decrementing the contents of register B.
Sound can also be produced on the Lynx by use of the SOUND command. This is followed by two parameters: a machine code address and a number representing a delay. SOUND is very rapid and, therefore, very versatile — if tedious to use. Starting from the given address, the command reads the code stored there and converts it directly into a pulse to the loudspeaker setting amplitude according to the code. The command moves on to the next memory address and repeats until it finds a 0 in the memory.
A typical use of the SOUND command would start by filling memory locations with suitable numbers. For example:
1 1 1 1 1 1 1 1 2 1 2 1 2 1 2 1 3 1 3 1 3 1 3 1 4 1 4 1 4 1 4 1
might be entered, starting from &A000 and going on until 63 1 63 1 63 1 63 1 is reached. The next memory location would then be filled with a zero (all numbers are entered, using the machine code monitor's M command, in hexadecimal). The statement SOUND &A000, 10 would then produce a brief note rising in volume to maximum level. The tone produced lasts less than a second, but is very pure and pleasant. Using this technique, it is quite possible to produce very complex and interesting sounds. The Lynx manual — which, unforgivably, includes no proper memory map — claims that speech synthesis might even be achieved. Well, I doubt whether anyone would be dedicated enough to produce speech by this method even if they were being paid, but there are plenty of musical possibilities offered by direct synthesis like this. Thankfully, it is not as taxing to produce music as it is to produce speech — at least, on a computer.
To sum up, then, the Lynx is a machine with some startling defects — especially when you consider its price (by the way, on the 96 only about 40K of memory is available to the user — large amounts of memory are eaten-up by the graphics). It can't be said to be a general purpose machine, but the specialist musician interested in direct synthesis will get much from it.
Feature by Gary Herman
mu:zines is the result of thousands of hours of effort, and will require many thousands more going forward to reach our goals of getting all this content online.
If you value this resource, you can support this project - it really helps!