ZX Computings - OpenLibra
ZX Computings - OpenLibra
ZX Computings - OpenLibra
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
<strong>ZX</strong>80 Programs<br />
<strong>ZX</strong>80 fights back<br />
Music<br />
Kev Molloy decides the days of silent<br />
movies are over, and produces a<br />
routine to turn your <strong>ZX</strong>80 into a music<br />
machine.<br />
Kev's program plays a passable<br />
version of Greensleeves in this<br />
program, which is stored as a<br />
string. The length of each note<br />
is stored in another string. The<br />
higher the number (from one to<br />
eight) the longer the length of<br />
the note. The key for notes is as<br />
follows:<br />
D - V; D sharp - R; E - P; F -<br />
N; F sharp — L; G — J; G sharp<br />
- M; A - G; 8 flat - E; B - C;<br />
C — A; C sharp — 8; D — sharp;<br />
D sharp - 6; E - 5; F - 4; F<br />
sharp - 3; G — 1; G sharp - 0.<br />
Although this is only a rough<br />
guide, it works on most occasions<br />
and whenever it sounds a<br />
bit off, all you need to do is add<br />
or subtract one or two.<br />
10<br />
20<br />
30<br />
40<br />
50<br />
60<br />
70<br />
80<br />
90<br />
100<br />
110<br />
LET B$ = "24231242312423124242423124231<br />
2312312426692242312423124266922423124<br />
2312C"<br />
LET T$ = "GA75457CJGCAGGHGCHPGA75457CJGC<br />
ACGHLHGGG1 1 357CJGCAGGHGCHP1 1 357CJGCAG<br />
HLHG<br />
IF B$ = " " THEN STOP<br />
LET N = CODE{T$) - 28<br />
LET P= (CODE(B$) - 28)* 10<br />
FOR I= 1 TO P<br />
LET D = 1 **N<br />
NEXT I<br />
LET 8$ =TL$(B$)<br />
LET T$ = TL$(T$)<br />
GOTO 30<br />
<strong>ZX</strong> COMPUTING SUMMER 1982 101