Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
19
Task/Metronome/REXX/metronome-1.rexx
Normal file
19
Task/Metronome/REXX/metronome-1.rexx
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
/*REXX program simulates a visual (textual) metronome (with no sound). */
|
||||
parse arg bpm bpb dur . /*obtain optional arguments from the CL*/
|
||||
if bpm=='' | bpm=="," then bpm=72 /*the number of beats per minute. */
|
||||
if bpb=='' | bpb=="," then bpb= 4 /* " " " " " bar. */
|
||||
if dur=='' | dur=="," then dur= 5 /*duration of the run in seconds. */
|
||||
call time 'Reset' /*reset the REXX elapsed timer. */
|
||||
bt=1/bpb /*calculate a tock-time interval. */
|
||||
|
||||
do until et>=dur; et=time('Elasped') /*process tick-tocks for the duration*/
|
||||
say; call charout ,'TICK' /*show the first tick for the period. */
|
||||
es=et+1 /*bump the elapsed time "limiter". */
|
||||
$t=et+bt
|
||||
do until e>=es; e=time('Elapsed')
|
||||
if e<$t then iterate /*time for tock? */
|
||||
call charout , ' tock' /*show a "tock". */
|
||||
$t=$t+bt /*bump the TOCK time.*/
|
||||
end /*until e≥es*/
|
||||
end /*until et≥dur*/
|
||||
/*stick a fork in it, we're all done. */
|
||||
23
Task/Metronome/REXX/metronome-2.rexx
Normal file
23
Task/Metronome/REXX/metronome-2.rexx
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
/*REXX program simulates a metronome (with sound). Regina REXX only. */
|
||||
parse arg bpm bpb dur tockf tockd tickf tickd . /*obtain optional arguments from the CL*/
|
||||
if bpm=='' | bpm=="," then bpm= 72 /*the number of beats per minute. */
|
||||
if bpb=='' | bpb=="," then bpb= 4 /* " " " " " bar. */
|
||||
if dur=='' | dur=="," then dur= 5 /*duration of the run in secs*/
|
||||
if tockf=='' | tockf=="," then tockf=400 /*frequency " " tock sound " HZ. */
|
||||
if tockd=='' | tockd=="," then tockd= 20 /*duration " " " " " msec*/
|
||||
if tickf=='' | tickf=="," then tickf=600 /*frequency " " tick " " HZ. */
|
||||
if tickd=='' | tickd=="," then tickd= 10 /*duration " " " " " msec*/
|
||||
call time 'Reset' /*reset the REXX elapsed timer. */
|
||||
bt=1/bpb /*calculate a tock─time interval. */
|
||||
|
||||
do until et>=dur; et=time('Elasped') /*process tick-tocks for the duration*/
|
||||
call beep tockf, tockd /*sound a beep for the "TOCK". */
|
||||
es=et+1 /*bump the elapsed time "limiter". */
|
||||
$t=et+bt
|
||||
do until e>=es; e=time('Elapsed')
|
||||
if e<$t then iterate /*time for tock? */
|
||||
call beep tickf, tickd /*sound a "tick". */
|
||||
$t=$t+bt /*bump the TOCK time.*/
|
||||
end /*until e≥es*/
|
||||
end /*until et≥dur*/
|
||||
/*stick a fork in it, we're all done. */
|
||||
23
Task/Metronome/REXX/metronome-3.rexx
Normal file
23
Task/Metronome/REXX/metronome-3.rexx
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
/*REXX program simulates a metronome (with sound). PC/REXX or Personal REXX only.*/
|
||||
parse arg bpm bpb dur tockf tockd tickf tickd . /*obtain optional arguments from the CL*/
|
||||
if bpm=='' | bpm=="," then bpm= 72 /*the number of beats per minute. */
|
||||
if bpb=='' | bpb=="," then bpb= 4 /* " " " " " bar. */
|
||||
if dur=='' | dur=="," then dur= 5 /*duration of the run in secs*/
|
||||
if tockf=='' | tockf=="," then tockf=400 /*frequency " " tock sound " HZ. */
|
||||
if tockd=='' | tockd=="," then tockd= .02 /*duration " " " " " sec.*/
|
||||
if tickf=='' | tickf=="," then tickf=600 /*frequency " " tick " " HZ. */
|
||||
if tickd=='' | tickd=="," then tickd= .01 /*duration " " " " " sec.*/
|
||||
call time 'Reset' /*reset the REXX elapsed timer. */
|
||||
bt=1/bpb /*calculate a tock─time interval. */
|
||||
|
||||
do until et>=dur; et=time('Elasped') /*process tick-tocks for the duration*/
|
||||
call sound tockf, tockd /*sound a beep for the "TOCK". */
|
||||
es=et+1 /*bump the elapsed time "limiter". */
|
||||
$t=et+bt
|
||||
do until e>=es; e=time('Elapsed')
|
||||
if e<$t then iterate /*time for tock? */
|
||||
call sound tickf, tickd /*sound a tick. */
|
||||
$t=$t+bt /*bump the TOCK time.*/
|
||||
end /*until e≥es*/
|
||||
end /*until et≥dur*/
|
||||
/*stick a fork in it, we're all done. */
|
||||
Loading…
Add table
Add a link
Reference in a new issue