home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 32
/
032.d81
/
metronome
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
2KB
|
75 lines
0 goto90
1 ifx(n)>99thenprint""tab(20)"[151]"x(n)
2 ifx(n)<100thenprint""tab(21)"[151]"x(n)
3 return
5 f=peek(203):iff=64thenreturn
6 iff=40thenn=n+1
7 iff=43thenn=n-1
8 ifn<1thenn=1
9 ifn>39thenn=39
10 iff=40orf=43thengosub1:goto5
11 rem note shape selection
12 iff=59thenprint""tab(15)"[151][145][[157]^"
13 iff=11thenprint""tab(15)"[151][145]\[157]_"
14 iff=27thenprint""tab(15)"[151][145]z[157]]"
15 iff=62then620
20 return
90 ifpeek(12296)<>56andpeek(12298)<>68thenload"metronome.fnt",8,1
100 dimx(39),r(39):s=54272
110 poke53280,1:poke53281,1:poke650,128
120 print"[147][144]"spc(7)"welcome to magic metronome"
130 print""spc(13)"reading data..."
140 forn=1to39:readx(n),r(n):next
145 fora=1to1000:next
150 poke56,48
210 poke53272,(peek(53272)and240)+12
230 rem main screen
240 n=11:print"[147]":print
250 printtab(11)"[155]magic metronome"
260 printtab(18)"[149][169] [223]"
270 printtab(17)"[169] [223]"
280 printtab(16)"[169] [223]"
290 printtab(15)"[169] [223]"
300 printtab(15)" "
310 printtab(15)"[151][145]\[157]_ = "x(n)
320 print:print
330 printtab(7)"[151]2[146] = [145][[157]^"spc(8)"+[146] = increase"
340 printtab(7)"4[146] = [145]\[157]_"spc(8)"-[146] = decrease"
350 printtab(7)"8[146] = [145]z[157]]"spc(8)"q[146] = quit":print
360 printtab(6)"values from 40 to 208 b.p.m."
370 rem timing and sound
380 pokes+24,15
390 fort=0tor(n):next
400 pokes+4,19:pokes+5,0:pokes+1,67:pokes,15
410 pokes+4,18
420 print""spc(19)"[149][206][146]"
422 gosub5
430 fort=0tor(n):next
440 pokes+4,19:pokes+5,0:pokes+1,67:pokes,15
450 pokes+4,18
460 print""spc(19)"[149][205][146]"
470 rem increment selection
480 gosub5
580 ifx(n)>99thenprint""tab(20)"[151]"x(n)
590 ifx(n)<100thenprint""tab(21)"[151]"x(n)
600 goto390
610 rem quit--windowshade
620 print"[147]";
630 a$=" "
640 b$=" [146] [194][146]"
650 fora=1to17
660 print"[144]"a$;:next
670 printb$
680 printtab(19)"[215][146]"
690 printtab(14)"good night!"
700 poke646,11:open15,8,15,"r0:hello connect=hello connect":input#15,er:close15
702 ifer<>63thenend
704 print"[147]":poke53272,21:load"hello connect",8
710 rem data for x and r
720 data40,1444,42,1380,44,1316,46,1250,48,1204,50,1158,52,1110
730 data54,1076,56,1030,58,990,60,960,63,904,66,864
740 data69,820,72,786,76,740,80,702,84,670,88,630,92,600
750 data96,580,100,550,104,522,108,494,112,474,116,459,120,438
760 data126,414,132,390,138,370,144,352,152,330,160,305
770 data168,288,176,263,184,250,192,238,200,228,208,220