RosettaCodeData/Task/Metronome/Locomotive-Basic/metronome.basic
2023-07-01 13:44:08 -04:00

10 lines
266 B
Text

10 bpm=120:bpb=4
20 sleep=50*60/bpm
30 counter=0
40 every sleep gosub 100
50 goto 50
100 print counter+1;" ";
110 if counter=0 then print ">TICK<":sound 1,60,10,15 else print " tick ":sound 1,119,10
120 counter=counter+1
130 if counter=bpb then counter=0
140 return