home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
World of Shareware - Software Farm 2
/
wosw_2.zip
/
wosw_2
/
DESKTOP
/
ALARM40.ZIP
/
ALARM.DOC
< prev
next >
Wrap
Text File
|
1992-07-19
|
21KB
|
595 lines
TITLE: ALARM 4.0
DESCRIPTION: Resident clock, chime, and alarm program
Copyright (c) 1992 by Thomas A. Lundin.
All Rights Reserved.
RELEASE DATE: 6-12-92
AUTHOR: Thomas A. Lundin
16267 Hudson Avenue
Lakeville, MN 55044
PHONE: (612) 588-7571 (8am-5pm Central, weekdays)
(612) 431-5805 (nights and weekends)
REGISTRATION: $20 per copy
ABSTRACT:
ALARM provides a memory-resident on-screen clock in the upper or
lower right corner. On the hour and half-hour, a short tune is
played (the tunes are programmable by you). The program can also
store up to 10 alarm times per day which will be indicated by
another tune and a flashing reminder message at the bottom of the
screen, all of which are programmable. The clock display, chimes,
and alarms can be toggled on or off individually. Alarms can be
specified for day of the week, daily, or single-time activation.
REVISION HISTORY:
4.0 6/12/92 Major revision, split into two programs
3.02 12/5/90 Display a clock
3.0 10/14/90 First release, loads tunes from external file
NOTE TO USERS OF ALARM 3.02 AND PRIOR:
You won't be able to use your current version of alarm settings or
alarm tunes.
This version of ALARM differs in the way it handles musical tune
files. You will need to edit your existing tune files to make them
compatible with version 4.0. Basically, this simply involves
removing the first parameter in the tune file (the positional
indicator), which is now specified on the command line rather than
being imbedded within the file.
The format of the ALARM.DAT file has also been changed to allow for
more convenient alarm setting. See the appropriate section below for
details.
Also, the earlier version of ALARM has now been split into two
separate programs: ALARM and ALARMSET. Doing this has helped to
reduce the memory requirements for the TSR portion of ALARM, and has
allowed me to put additional features into the program.
ALARM.DOC REV 7/19/92 PAGE 1
ALARM is distributed as shareware. It is not free software. If you
continue to use this program beyond a 30-day trial period, you are
required to register it. The registration fee for this version is $20 per
copy. Upon registration, you will receive the most recent version of the
program with an expanded 30-alarm capacity. Make checks payable to Thomas
A. Lundin (U.S. funds and drawable at a U.S. bank). Please send your
registrations to:
Thomas A. Lundin
16267 Hudson Avenue
Lakeville, MN 55044
The registration fee for ALARM on network file servers is a $50 flat
charge for up to 20 workstations PER SERVER, and a $100 flat charge for
unlimited (over 20) workstations PER SERVER.
I welcome suggestions and comments regarding ALARM. The suggestions of
registered users will always be considered first. Please respect the
tenets of shareware and register if you intend to use the program beyond
the trial period. It is my policy to not add features to the program on
the promise of registration, so if you are not a registered user, please
do not ask me to change the program to suit your needs. Program bugs are
a different story. I will investigate reported bugs from any user and
will attempt to fix those within my control.
DISCLAIMER.
This program and its associated documentation are provided AS IS, without
any express or implied warranty. The program is not warranted as to
suitability or fitness for any particular purpose. The author and/or
distributor of this program shall not be held liable for any perceived or
real damages emanating from the use or misuse of this program. The user
of this program understands that operation of this program is undertaken
at the user's own risk.
ALARM.DOC REV 7/19/92 PAGE 2
OPERATION OF ALARM 4.0.
The program is run from the command line. First, the TSR portion of
the program must be run. This portion of the program handles all of
the timekeeping, display and sound functions. At the DOS prompt,
type:
alarm
This command needs only to be run once. If you attempt to run ALARM
more than once, no harm done. The program will ensure that only one
copy of itself is in memory. After this is done, all other settings
are made by running the ALARMSET program. If the ALARM program
hasn't been run first, ALARMSET will not work; it will simply note
that ALARM is not loaded. The format of the ALARMSET program is:
alarmset [options]
The available options to the ALARMSET program are:
-x Clock disable-enable
-c Chimes on-off
-a Alarm on-off
-k Clock display on-off
-p Clock position top-bottom
-e Date display on-off
-rN Repeat alarms N times
-l List the current alarms
-sFILENAME Set alarms from FILENAME (default=ALARM.DAT)
-tFILENAME Load top-of-the-hour tunes from FILENAME
-hFILENAME Load half-hour tunes from FILENAME
-mFILENAME Load alarm tunes from FILENAME
-dMM/DD/YY Set the alarm date
-vXX Video attribute (hex value XX)
-? List the available ALARMSET options
Multiple options can be used with ALARMSET as long as each one is
separated by a space.
EXPLANATION OF ALARMSET OPTIONS.
-x Clock disable-enable
This option toggles between enabling and disabling the ALARM
program. Disabling the program turns off the clock display, alarms
and chimes, and bypasses the timer interrupt subroutine. The most
common need for this feature is to avoid problems with communication
programs; some programs will be unable to communicate properly
(especially at 9600 bps) -- even if they're interrupt-driven -- when
ALARM is running.
-c Chimes on-off
This option toggles between allowing the half-hour and hourly chimes
to sound or be silent.
ALARM.DOC REV 7/19/92 PAGE 3
-a Alarm on-off
This option toggles between allowing the programmable alarms to
sound or be silent. When the alarms are disabled, the alarm messages
are not displayed.
-k Clock display on-off
This option toggles between displaying the on-screen clock or hiding
it. When hidden, the chimes and alarms will still sound unless they
too have been specifically disabled.
-p Clock position top-bottom
This option toggles the clock display between the upper-right corner
of the screen and the lower-right corner of the screen.
-e Date display on-off
This option toggles between displaying the time and date or
displaying just the time. When date+time is selected, the date is
displayed for approximately one second and the time is displayed for
approximately two seconds per cycle. The date display is composed of
day of the week, month, and day.
-rN Repeat alarms N times
By default, the alarm tune is played twice through when an alarm is
triggered. This option allows you to specify how many times through
you want the alarm tune to play. For instance, "alarmset -r4" will
make the alarm tune play through four times.
-l List the current alarms
This option allows you to see what alarms are currently active.
-s Set alarms from ALARM.DAT
-sFILENAME Set alarms from FILENAME
This option set the alarm times according to the information stored
in your alarm file (see the section further down for information
about the alarm file). This option has two alternative formats: one
specifies a filename and the other does not. When -s is used by
itself, alarm settings are loaded from a file named ALARM.DAT. When
a filename is given immediately after the -s, alarm settings are
loaded from that given filename. For example, "alarmset -
smyalarm.txt" will set the alarms stored in the file MYALARM.TXT.
-tFILENAME Load top-of-the-hour tunes from FILENAME
This option loads the tune that will be played at the top of each
hour. (The tune file must be created in a format described later in
this document.) For example, "alarmset -ttop.tun" will load the top-
of-the-hour chimes from a file named TOP.TUN. The default tune is a
single beep -- not very interesting.
-hFILENAME Load half-hour tunes from FILENAME
This option is the same as the -t option, above, except that it
loads the tune that will be played each half-hour.
ALARM.DOC REV 7/19/92 PAGE 4
-mFILENAME Load alarm tunes from FILENAME
This option is the same as the -t option, above, except that it
loads the tune that will be played when an alarm is triggered.
-dMM/DD/YY Set the alarm date
Normally, ALARMSET loads alarms for the current date only when the -
s option is executed. With the -d option, you can force another
date's alarms to be loaded in place of the current date.
-vXX Video attribute (hex value XX)
The default clock display is black characters on a white background
(reverse video on monochrome monitors). If you want different
colors, you can explicitly set the foreground and background colors
with this option. The first hex digit controls the background color
and the second digit controls the foreground color. The foreground
color digit can range from 0-9, A-F. The background color digit can
range from 0-7. For example, "alarmset -v1e" would display bright
yellow characters on a blue background. (On monochrome monitors,
only a few of the possible hex values can be mapped to video
attributes; these are 07, 01, 70, and 00.) The color digits and
their displayed colors are:
0 = black
1 = blue
2 = green
3 = cyan
4 = red
5 = magenta
6 = brown (sometimes dark yellow)
7 = light gray (sometimes normal white)
8 = dark gray (sometimes black)
9 = light blue
A = light green
B = light cyan
C = light red
D = light magenta
E = bright yellow
F = bright white
FORMAT OF THE ALARM.DAT FILE.
ALARM.DAT is an ASCII file which contains the alarm dates, times,
and messages that the program will use. Up to 10 alarm times can be
programmed for one date (30 alarm times in the registered version),
but your ALARM.DAT file can contain alarms for as many dates as you
want. Each alarm is entered in the following format:
MM/DD/YY HH:MM AM|PM Your message here!
Each item in the alarm line must be separated by one or more spaces.
The first item in the line is the date the alarm will be loaded. If
the alarm date matches the current date when the ALARMSET program is
ALARM.DOC REV 7/19/92 PAGE 5
run with the -s option, the alarm line will be set; otherwise the
line will be ignored. The date is entered in standard month/day/year
notation. The year may be entered in two-digit or four-digit form.
You can also set a daily alarm by entering the word DAILY in place
of a specific date. When ALARMSET sees the word DAILY in an
ALARM.DAT file, it will load the alarm regardless of the date, and
the ALARM program will set off the alarm each day at the specified
time, even if the program is left running for a number of days. You
can also set alarms to recur on any day of the week, such as
MONDAYS, TUESDAYS, WEDNESDAYS, THURSDAYS, FRIDAYS, SATURDAYS and
SUNDAYS, by typing in the appropriate word in place of a specific
date. If the current day matches what you've typed in the ALARM.DAT
line, the alarm will be set. The ALARMSET program must be run each
day in order to update the day-of-the-week and specific-date alarms;
only the DAILY alarm will carry over without intervention.
The second item in the alarm line is the time that the alarm will be
set off. The time is set in 12-hour hours:minutes notation. The
hours do not require a leading zero.
The next item is the AM/PM indicator. This item is necessary to
distinguish between day and night times. A time of 12:00 AM is
midnight, while 12:00 PM is noon.
The last item is the message that will be displayed when the alarm
is set off. The message can be up to 40 characters long.
(See the sample ALARM.DAT file for examples.)
Any line in the ALARM.DAT file which begins with a semi-colon (;) is
treated as a comment line, and will be ignored. You can use comment
lines to annotate your alarms.
If you enter an alarm time that is on the hour or half-hour, the
alarm tune will not sound, so be sure to set your alarms for
something other than :00 or :30 minutes.
When an alarm goes off, the alarm message associated with the alarm
will be displayed on the last line of your screen, and the alarm
tune will play. The message remains on the screen until some other
screen activity overwrites it.
The ALARMSET -s option will load the alarms from ALARM.DAT (or from
a specified file, if you gave one). ALARM.DAT must reside in the
current subdirectory, or in a subdirectory that is part of your PATH
command. When alarms are set, they are automatically enabled, even
if you disabled them previously with the -a option.
FORMAT OF THE TUNES FILES.
A tune file is an ASCII file which contains the individual musical
frequencies which make up an hourly, half-hourly, or alarm chime.
Each tune file contains one line defining the tune which can be
ALARM.DOC REV 7/19/92 PAGE 6
loaded into any of the hourly, half-hour or alarm chimes. The format
of a tune line is:
BEEP_SPEED,NOTE1,NOTE2,NOTE3,...,NOTE63,0
All elements are separated from one another by a comma.
BEEP_SPEED must be a number from 1 to 18. It determines how long
each note is played, in increments of 1/18th of a second. For
example, a BEEP_SPEED value of 3 will play each note for about 1/6
of a second. BEEP_SPEED is an absolute timing measure based on the
18.2 ticks per second of the system clock, so chimes and alarms will
sound the same regardless of processor speed. I've found that a
BEEP_SPEED value of 3 makes for a normal pace, while a value of 2
speeds things up quite a bit, and 4 is best left for funeral dirges.
NOTE1 through NOTE63 are the individual notes, entered as frequency
values or chromatic scale mnemonics, which compose the tune being
played. The musical note mnemonics and their associated numeric
frequencies are as follows:
C#0 17 A1 55 F3 175 C#5 554 A6 1760
D0 18 A#1 58 F#3 185 D5 587 A#6 1865
D#0 19 B1 62 G3 196 D#5 622 B6 1976
E0 21 C2 65 G#3 208 E5 659 C7 2093
F0 22 C#2 69 A3 220 F5 698 C#7 2217
F#0 23 D2 73 A#3 233 F#5 740 D7 2349
G0 25 D#2 78 B3 247 G5 784 D#7 2489
G#0 26 E2 82 C4 262 G#5 831 E7 2637
A0 28 F2 87 C#4 277 A5 880 F7 2794
A#0 29 F#2 93 D4 294 A#5 932 F#7 2960
B0 31 G2 98 D#4 311 B5 988 G7 3136
C1 33 G#2 104 E4 330 C6 1047 G#7 3322
C#1 35 A2 110 F4 349 C#6 1109 A7 3520
D1 37 A#2 117 F#4 370 D6 1175 A#7 3729
D#1 39 B2 123 G4 392 D#6 1245 B7 3951
E1 41 C3 131 G#4 415 E6 1329 C8 4186
F1 44 C#3 139 A4 440 F6 1397 REST -1
F#1 46 D3 147 A#4 467 F#6 1480 NULL 0
G1 49 D#3 156 B4 494 G6 1568
Two or more consecutive notes of the same frequency will sound like
one long note (useful for providing aesthetically-pleasing musical
phrasing). The series of notes must be terminated with a 0 value (or
mnemonic NULL).
To load a tune into memory, use the -tFILENAME option (or -h or -m),
where FILENAME is any valid PC path/filename that contains tune
information. I've provided a few sample tune files for you to
experiment with. Notice how I've subdivided the basic tempo in some
of the tunes into halves or thirds to allow for simulated rests,
quarter- and half-notes, etc.
ALARM.DOC REV 7/19/92 PAGE 7
Any line in the tune file which begins with a semi-colon (;) is
treated as a comment line and will be ignored.
NOTES
If you allow your computer to run past midnight, ALARM will
automatically increment the date and update the DOS system date, but
it will not update any alarms (except for DAILY alarms, which are
automatically reset and enabled). You need to run ALARMSET to load
date-specific or day-of-the-week alarms for the new date.
ALARM uses approximately 13K of RAM when resident.
ALARM and ALARMSET are written in Borland C++ 3.0.
ALARM.DOC REV 7/19/92 PAGE 8
REGISTRATION FORM
DATE: ________________________
NAME: __________________________________________________________________
COMPANY: _______________________________________________________________
ADDRESS: _______________________________________________________________
_______________________________________________________________
CITY: _______________________________ STATE: _______ ZIP: _____________
PHONE: _____________________________ FAX: ______________________________
FEE SCHEDULE QTY AMOUNT
REGISTRATION FOR ALARM 4.0 @ $20 PER COPY ________ x $20 = _________
SITE LICENSE FOR STAND-ALONE UNITS
5 - 10 UNITS @ $15 PER COPY ________ x $15 = _________
11 - 20 UNITS @ $10 PER COPY ________ x $10 = _________
OVER 20 UNITS @ $5 PER COPY ________ x $ 5 = _________
NETWORK FILE SERVER REGISTRATION
<=20 WORKSTATIONS @ $50/FILE SERVER ________ x $50 = _________
>20 WORKSTATIONS @ $100/FILE SERVER ________ x $100= _________
SHIPPING AND HANDLING (INDICATE ANY THAT APPLY)
(For single copies only; call for S/H on multiple copies)
FIRST CLASS MAIL ___$5.00_
UPS GROUND ____7.50_
OVERNIGHT DELIVERY ___20.00_
C.O.D. ADD ____7.50_
TOTAL ________ _________
Send this form with payment to:
Thomas A. Lundin
16267 Hudson Avenue
Lakeville, MN 55044
Payment terms are Prepaid or C.O.D.
Corporate purchase orders accepted from Fortune 1000 firms only.
ALARM.DOC REV 7/19/92 PAGE 9