                             PaCeR v3.20

Pcr.exe is an audible pacer/timer for exercise machines, such as
rowing machines and cycle ergometers - a configurable metronome -
which can be adapted for other types of exercise timing, such as
circuit training.  It's a very small DOS program, which should run on
any PC, uses the PC speaker, and displays an on-screen stop-watch.
Final release.

                             INSTALLATION

The supplied files are:

PCR.EXE  - the executable

README.TXT - the manual (this file)

ROW.BAT - example batch file

CURSOFF.COM - turn off cursor; for use in batch files
CURSON.COM  - turn on cursor

There are no special installation instructions.  PCR.EXE can be run
from a hard or floppy disk under MSDOS 3.3 or later, or equivalent OS.

                              BASIC USE

By default PCR will behave as a basic metronome and run for an hour at
30 beeps/min.  To make it beep slower or faster press the keys marked
'<' or '>' repeatedly; it is not necessary to press the shift key.

To stop at any time, press 'Esc'.

To pause without losing your settings press 'spacebar'.

                      CHANGING THE START CADENCE

To change the start cadence, enter a space after the program name
followed by a single numeric parameter in the range 20 .. 1000; for
example:

PCR 661

This will set the initial cadence to 66.1 beeps/min.

The minimum setting is 20; ie 2 beeps/min.

                   CHANGING THE CADENCE ADJUSTMENT

By default the cadence is adjusted by 1 beep/min each time you press
'<' or '>'.  To change the amount of adjustment enter a second
parameter in the range -128 .. 127; for example:

PCR 661 12

This will adjust the cadence by 1.2 beeps/min each time you press the
adjustment keys.

If you insert a negative value the effect of the adjustment keys will
be reversed.

                           PRE-PROGRAMMING

If you really want to control the program, this can only be achieved
by the combined use of command-line parameters and batch files.  Even
greater efficiency can be achieved by copying PCR.EXE and any
associated files to a ram disk, particularly where a batch file
includes multiple calls to the program.

Batch files and ram disks are not discussed further here.  However,
ROW.BAT is included as an example and should provide plenty of ideas.
You can improve the display by turning off the cursor and, if the OS
supports it, switching to 25 * 40 display mode.  These techniques are
illustrated in ROW.BAT, though you may need to remove 'rem' to enable
the appropriate lines.  Under Windows 9x the use of these commands may
cause a system crash.  PCR.EXE itself will run okay, however, in a DOS
window.

                       COMMAND-LINE PARAMETERS

All parameters are numeric and separated by a space.  Parameters must
be entered in the order indicated below.  Any parameter may be omitted
provided all following parameters in the sequence are also omitted.

Syntax: PCR c a w n r p u l m0 m1 d f

where

c = start cadence in beeps per minute expressed as an integer in the
range 20 .. 1000 where one decimal place is assumed.  See above.

c can also be set to 0 (zero).

This last setting effectively disables the "inner" timer and allows
timing on work/relief intervals alone.

The maximum beep gap that can be timed is around 30000 milliseconds;
ie 2 beeps/min.

a = adjustment in beeps/min or milliseconds, range -128 .. 127.

Default mode adjusts in beeps/min, where one decimal place is assumed;
ie 120 = 12.0 beeps/min.  The effect of entering a negative number is
to decrease speed when auto-adjusting (see 'u' below); also the
adjustment keys are reversed.  See also 'm0' below.

w = work interval, range 0 .. 32767.  Default units are seconds (see
m1 below).

The program times this and any relief interval to 1/18.2 second.  Any
given number of seconds will be rounded up or down.  While it is
possible for the times reported to appear imprecise, this will have no
effect on the accuracy of the stopwatch.

n = number of intervals, range 0 .. 255.

You can set zero intervals if you want, although the program isn't
going to do very much, except, perhaps, play a note.

r = relief interval (by default in seconds).  As for 'w' above.

A relief interval, if set, will precede each work interval.

ALL REMAINING PARAMETERS ARE REALLY FOR CONTROLLING BATCH FILES.

p = initial pause status; 0=on  1=off

u = auto adjust; 0=off  1=on

If auto adjust is set 'on' it will execute the adjustment set under 'a'
above at the end of each work interval.

l = limit (ie maximum cadence) when auto adjusting. Values as for 'c'
above.  Default is 999, which rounds to 100.0.

m0 (mode 0) = define cadence adjustment type; 0 = linear adjustment
(default); 1 = non-linear adjustment in milliseconds.
Note 55 m/s is approximately 1/18.2 sec.  Retained for compatibility
with earlier program ITIM.EXE.

m1 (mode 1) = define work/relief interval units;  0 = seconds
(default); 1 = ticks (1 second = 18.206482 ticks).  Ticks are for fine
tuning intervals; eg, making recordings on cassette tape, where the
playback is not at the expected speed.  A deal of trial and error is
likely to be needed.

d = duration of beep in m/s.  Range 100 .. 1000; default = 200.

f = frequency of 'stroke' beep.  Range 500 .. 3000; default = 1200.
A smaller number gives a higher tone, which means that the units do
not correspond to hertz.  I don't actually know what they do
correspond to.  'Start' beeps are an automatic ratio of the stroke
setting.

LIMITED ERROR TRAPPING IS APPLIED ONLY TO INITIAL SETTINGS.

Admittedly, this interface is tricky.  Great care must be taken when
entering a large number of parameters, which is why batch files are
best for regular use.  However, with this degree of flexibility there
has to be a trade off.

                            TYPICAL SPEEDS

Rowing machines work best at a pace of around 30 strokes/min.

Cycles go much faster - from 60 to 100 rpm.  If you want to go much
above 66 I suggest you set the pace to half and count a beep every
other cycle; eg for 80 rpm set 400 (40 beeps/min).

Free exercises are different.  If you wanted to time an event for say
1 minute, you could either set a cadence of 0 and time on the work
interval alone or set a cadence of say 40 (4 beeps/min) and use the
stroke beep as a periodic prompt.  With stroke beeps used in this
manner you have to be careful that your intended work interval does
not overrun (see below: LAST BEEPS).  It might be necessary to do some
very fine calculations to get things to work, using the m0 and m1
parameter options.

                             START BEEPS

The start of any interval, and the end of each relief interval, is
signalled at a lower frequency.  These low beeps are 'start' beeps.

Consider two possible situations.

1. Successive work intervals are seamlessly joined together with
relief intervals set to zero.  In this case only the first (low) start
beep is properly separated from the next high 'stroke' beep.  For
timing purposes, the last beep of any interval coincides with the
start of the next.  Both beeps are sounded, but since they cannot be
sounded simultaneously (the PC speaker has only one voice) you will
hear a characteristic high-low sound as they run close together.

2. Work intervals are preceded by relief intervals greater than 0
seconds.  In this case, PCR sounds a distinct start beep before every
work interval.

Start beeps are excluded from the stroke count.  This produces a
consistent stroke count in situations like 1 above.  The drawback is
that, if rowing, you must remember not to pull on a start beep.  This
is easily forgotten if using rest intervals.  For free exercises you
will want to start on the start beep.

                              LAST BEEPS

Due to the nature of the program, the last 'stroke' beep of any work
interval may encroach on the following interval.  This is because the
time-down for a beep will always be executed while there is any time
remaining in the work interval; also once a beep has begun to sound it
must run its full duration (200 m/s by default).

This is not normally a problem with a moderate to fast cadence.

With a typical set-up for rowing it merely accounts for the minor
timing variations that occur at the ends of successive work intervals.
This is not an inaccuracy in the program.  It is simply that it is not
always possible to fit the last beep exactly into a work interval.
Notice that the slight overrun is deducted from the following
interval.

However, this aspect of the program can produce strange effects if you
set a very slow cadence which fails to coincide with the end of a work
interval.

                               ACCURACY

The beep gap is accurate to 1 millisecond, with perhaps some allowance
for program overheads.  With beeps/min approaching 100 it is not
always possible to achieve 1/10 beep/min gradation.

The on-screen stopwatch should be accurate to at least 1/10th of a
second.

Due to rounding on work/relief intervals, if you were to join together
a large number of these you might eventually notice a cumulative
boundary error.  However, in practice this effect is negligible.  If
you want a series of beeps say 5 or 10 seconds apart, rather than use
a very short interval, use a slow cadence, as the latter can be set
with greater accuracy.

                          PROGRAM BIOGRAPHY

It would be true to say that my first interest in computer programming
came about as a result of a desire to produce an accurate audible
timer-prompt for use in circuit training routines.  Prior to writing a
computer program to do the job I recorded sounds manually on audio
cassette with the aid of a stop watch, a tin tray, and a large wooden
spoon!   My first program was in BASIC, running on an Atari ST, and
achieved a 30 second delay by varying the number of iterations in a
'for' loop, or some such.

The present program was developed from ITIM.EXE, originally placed on
the internet in February 1998.  The smallest time interval this
earlier program could handle was 1/18.2 second - a feature of the PC
timer (in its native state), which accounts for the appearance of this
peculiar fraction in the newer program - it still has its uses.  The
old name was short for 'Interval Timer', and gives a clue to the fact
that my early need was for the timing of quite long intervals.  Over
the years my requirements changed and the program matured into one
designed to time both long and short intervals.

Though superficially similar, PCR is a considerable improvement over
ITIM due to the fact that the low-level timing routines have been
extensively rewritten.  This largely involved direct programming of
the PC timer chip, which also controls the pitch and duration (but
alas not the volume) of sounds emitted by the PC's speaker.

                           COPYWRITE NOTICE

The author retains the copywrite of this software.  It may be used
free of charge, copied, and given away by individuals for
training/coaching purposes provided the activity is of a non-profit
making nature.  This document should be included with any
distribution.

Commercial entities, including educational establishments, and those
who charge a fee for their services, wishing to use or bundle this
software should contact the author to purchase a license.

Anyone interested in seeing an "MS Windows" version for commercial use
should contact the author.

                              DISCLAIMER

This software is supplied "as is" for use at your own risk.  No claims
may be made against the author for any damages or losses arising from
its use.

                        CONTACTING THE AUTHOR

If you find this program useful, or wish to report problems, I would
be pleased to hear from you.  This is not because I want to check up
on anyone or bombard them with upgrade offers - I am simply curious to
know who in the world may be using my program.  So please respond.
Just send an email or, better still, a picture post card from your
part of the world.

Paul Fox
Email: <pfx#bigfoot.com(anti-spam replace # with @ and remove this
message, including the round brackets)>
Conventional mail & post cards: c/o YMCA, Wood Street, Doncaster, DN1
3LH, UK.

The email address should be reliable so long as bigfoot.com live.  The
conventional mail address should be good for long enough.




















