1 COMMON A, AL, B, BASEONLY, C, C$, C1, CAT$, CC, CKT$, D, D$, DD, DIA, DIMN$, DMS, E, EO, EX$, F, F$, FD, FF, FQ, FRQ, G$, GO$, I, I$, L, LATLONG, LD, LL, LN, LS, LW, LX, MAX, MENU, MIN, MX, N, NN, NT, OV, P, PI, PROG$, Q, QQ, QU, R, RA, RC, T, T$, U, U$, UH, UL$, V$, VC, W, WHIP, WIRD, WW, X, X$, X1, XS, Z$, ZP, ZS
10 'METNOM - METRONOME - 08 MAR 08
20 CLS:KEY OFF
30 IF EX$=""THEN EX$="EXIT"
40 IF PROG$=""THEN GO$=EX$ ELSE GO$=PROG$
50 DIM D$(13,2)
60 '.....title page
70 COLOR 7,0,0
80 PRINT " METRONOME";TAB(57);"by George Murphy VE3ERP ";
90 COLOR 7,0:PRINT STRING$(80,205);
100 GOTO 250
110 '.....data
120 DATA Larghissimo,40
130 DATA Largo,50
140 DATA Larghetto,60
150 DATA Adagio,70
160 DATA Lento,80
170 DATA Andante,90
180 DATA Allegretto,100
190 DATA Moderato,120
200 DATA Vivace,130
210 DATA Allegro,140
220 DATA Presto,180
230 DATA Presstissimo,200
240 DATA Quit program,*
250 '.....load data
260 PRINT " Press letter in ( ) to select one of the following....."
270 PRINT
280 FOR Z=1 TO 13:READ D$(Z,1),D$(Z,2):NEXT Z:RESTORE
290 FOR Z=1 TO 13
300 PRINT " (";CHR$(96+Z);")  ";D$(Z,1):LOCATE CSRLIN-1,20:PRINT"(";D$(Z,2);" bpm*)"
310 NEXT Z
320 LOCATE CSRLIN-1,20:PRINT STRING$(40,32)
330 LOCATE CSRLIN-1,28:PRINT "* beats per minute"
340 PRINT
350 '.....start
360 Z$=INKEY$:IF Z$=""THEN 360
370 IF ASC(Z$)<97 OR ASC(Z$)>109 THEN CLS:GOTO 60
380 IF Z$="a"THEN T$=D$(1,1):M=VAL(D$(1,2))
390 IF Z$="b"THEN T$=D$(2,1):M=VAL(D$(2,2))
400 IF Z$="c"THEN T$=D$(3,1):M=VAL(D$(3,2))
410 IF Z$="d"THEN T$=D$(4,1):M=VAL(D$(4,2))
420 IF Z$="e"THEN T$=D$(5,1):M=VAL(D$(5,2))
430 IF Z$="f"THEN T$=D$(6,1):M=VAL(D$(6,2))
440 IF Z$="g"THEN T$=D$(7,1):M=VAL(D$(7,2))
450 IF Z$="h"THEN T$=D$(8,1):M=VAL(D$(8,2))
460 IF Z$="i"THEN T$=D$(9,1):M=VAL(D$(9,2))
470 IF Z$="j"THEN T$=D$(10,1):M=VAL(D$(10,2))
480 IF Z$="k"THEN T$=D$(11,1):M=VAL(D$(11,2))
490 IF Z$="l"THEN T$=D$(12,1):M=VAL(D$(12,2))
500 IF Z$="m"THEN CLS:RUN EX$
510 CLS:PRINT TAB(20);"Tempo : ";T$;M;"bpm"
520 PRINT STRING$(79,205)
530 LN=CSRLIN:VIEW PRINT LN TO 24:CLS:VIEW PRINT:LOCATE LN
540 '.....start
550 INPUT " ENTER: No. of beats per bar";B
560 D=60/M:PRINT " Duration of beat (seconds)=";D
570 CLS
580 TIMER OFF
590 K=0
600 FOR Z=1 TO B
610 IF Z=1 THEN K=K+Z
620 LOCATE 10,2:PRINT T$;" (";M;"bpm ) bar #";K
630 SOUND 440,5.000000E-02
640 COLOR 0,7:LOCATE 10,39:PRINT Z;:COLOR 7,0
650 TIMER ON
660 T1=TIMER
670 T2=T1+D
680 IF TIMER=>T2 THEN 690 ELSE 670
690 GOSUB 730
700 NEXT Z
710 CLS:GOTO 600
720 TIMER OFF:END
730 LOCATE 12,28:PRINT ".....Press any key....."
740 Z$=INKEY$:IF Z$=""THEN 760
750 CLS:GOTO 60
760 RETURN
770 END
