Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
11
Task/Metronome/XPL0/metronome.xpl0
Normal file
11
Task/Metronome/XPL0/metronome.xpl0
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
int BPM, Odd, Time0, Delay;
|
||||
[Text(0, "Beats per minute: ");
|
||||
BPM:= IntIn(0);
|
||||
Odd:= true;
|
||||
Delay:= 60_000_000/BPM; \microseconds per beat
|
||||
repeat Time0:= GetTime;
|
||||
repeat until GetTime-Time0 >= Delay;
|
||||
Text(0, if Odd then "tick" else " TOCK^m^j");
|
||||
Odd:= not Odd;
|
||||
until KeyHit;
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue