PROGRAM PITSTOP
Your Sinclair, December 1991

He's YS's answer to Tom Jones. He's got the scores on the doors
and the daffodils in the window box. Ladies and gentlemen, let's
have a big round of applause for JONATHAN DAVIES ...

I've never had much luck with cameras. That's why I thought I'd better
take this opportunity to point out that I don't look anything like any
of the photos that have appeared in Pitstop over the years, least of
all that one over there. (Fortunately I seem to be shrouded in
darkness, as Andy O's no Lord Lucan. Or was he the one who
disappeared?) Well, that and the fact that I was a bit stuck for
anything else to put in this month's intro, as usual.

Pitstop's temporarily down to one program this month, but what a
corker it is. Jim Newall's 48K Music System will send tingles down the
spine of anyone fed up with their Speccy's weedy Beep command.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

48K SOUND SYSTEM
by Jim Newall

Given the choice between a 128K and a 48K Spectrum, I'd plump for the
latter any day. That compact case, the easy on the fingers rubber
keys, the straightforward and nippy Basic editor, that endearing
keyword system, games that multi-load in convenient chunks - it all
adds up to a great package in my opinion, miles better than those
grey, impersonal Amstrad offerings. Our rubber-keyed buddy's just got
one small problem: the sound's crap. Getting it to play a tune
involves an endless string of Beep commands, and hours spent working
out the right numbers to go with each one. And if you do ever get the
thing finished, it tends to sound more like a digital watch alarm than
the symphonic masterpiece you'd originally intended.

But fret no longer. Here, and not a minute too soon, is Jim Newall
with his 48K Sound System, which aims to give your 48K pretty much the
same musical capabilities as the 128K. As well as giving you
two-channel polyphonic sound (not quite the 128K's three, but as near
as dammit), it also pulls off a convincing impression of the 128K's
Play command, so to play a tune you simply bung all the names and
lengths of the notes into a string and let the program do the rest.
You've also got full control over the length of the notes, the speed
of the tune and a range of sound effects, and repeats are easy to
accomplish.

First things first though. Type in the Basic section, which mainly
consists of a demo, and save it onto a blank tape. Then type in the
Hex Loader and use it to enter the hex listing. Remember that when
entering hex, only type the pairs of characters a line at a time, and
not the spaces between them which are there to make the text easier to
read. Save the code thus produced after the Basic, and then reset and
reload the whole thing. If all goes well you should hear Jim's rather
splendid demo.

By now you're probably itching to have a crack at a tune of your own.
It couldn't be simpler! (That's the whole point, after all.) What you
need to do is type LET a$="<lots of letters, numbers and funny
symbols>", where the contents of a$ are plucked from the following list:

a-g or A-G - pitch of note within current octave (N.B. pitch for channel A
must be followed immediately by pitch for channel B)
$ - use after a note to flatten it
# - use after a note to sharpen it
O - followed by channel (A or B) and then a number (1-3) sets octave
1-9 - sets length of notes
& - denotes a rest
T - followed by a number from 1-12 sets the tempo
() - enclose a phrase to be repeated
! - sound FX - follow by three letters and/or numbers for a variety of sound
effects (N.B. uses both sound channels)

The numbers representing note lengths are as follows:
1 - semi quaver
2 - dotted semi quaver
3 - quaver
4 - dotted quaver
5 - crotchet
6 - dotted crotchet
7 - minim
8 - dotted minim
9 - semibreve

It might sound a bit technical, but basically a crotchet is one beat
long, a minim is two beats, a semibreve is four beats, a quaver is
half a beat and a semi quaver is a quarter of a beat, and adding a dot
adds on half as much again. The length of a beat depends on the tempo
you've set.

The best way to get to grips with what's going on is probably to take
a gander at the demo, which explores all the various features. Once
everything's set up, RANDOMIZE USR 62000 to play it.

If you come up with any particularly spectacular tunes, please don't
send them to me.
