-------------!\-------------------------------------------------------------
             ! \                                    !\
-------------!------------------------!\------------!-\---------------------
             !            !\          ! \           !
-----------@@!------------!-\---------!-------------!-----------------------
           @@`            !           !           @@!
--------------------------!---------@@!-----------@@`-----------------------
                        @@!         @@`
------------------------@@`-------------------------------------------------

 ---===: TAMM :===---

Written by Tom Andrews (74016,140)

Aknowledgement:  TONE routine by Al Funk


This program was written using a similar method of operation as YAKETY.SNG
which I uploaded to this SIG some time ago.  This program reads data from
a data file, converts it to frequency and duration data, then plays the
tune using TONE (written by Al Funk).

The program was written using FORTRAN then compiled and linked.  The result
is a /CMD file which is executed from TRSDOS.  Executing TAMM is very easy;
just download TAMM.BIN and name the file TAMM/CMD, then at the TRSDOS READY
prompt enter TAMM.  The program will load and prompt you for the name of
the song data file.

When the data file name is entered, TAMM will read the data file line by
line.  If the data file is not found, an error message will appear and TAMM
will abort.  TAMM will also abort if the data file contains more than 2000
notes.


Data File Format:

The data file must be an ASCII file with a record length of 256 and a line
length of 80 characters.


Speed Correction Factor:

The first line of the data file contains the speed correction factor.
Because TAMM is capable of playing tones at a very fast speed, I needed
some means of slowing this rascal down.  However, using a single metering
index would not be useful for all songs.  Therefore, the SCF is used as a
constant value throughout the song.  The larger the SCF, the slower the
song is played.

The format of the SCF is ####.######.  It must be flush with the left
margin.
















Frequency Correction Factor:

The second line of the data file contains the frequency correction factor.
Because different songs use different octaves of notes, a clearer sound
can sometimes be acheived by shifting the frequecies of the notes up or
down.  The larger the FCF, the higher the frequency.  You will have to
experiment to find the FCF you think is best.

The format of the FCF is ####.######.  It must be flush with the left
margin.


Note Data:

The rest of the information in the data file relates directly to the
notes in the song.  The following codes are used:

       Notes:
               a       A natural
               A       A sharp
               b       b natural
               c       C natural
               C       C sharp
               d       D natural
               D       D sharp
               e       E natural
               f       F natural
               F       F sharp
               g       G natural
               G       G sharp

       Beats:
               1       1 beat
               2       2 beats
               3       3 beats
               4       4 beats
               5       5 beats
               6       6 beats
               7       7 beats
               8       8 beats

       Octaves:
               U       First octave (lowest)
               I       Second octave
               O       Third octave
               P       Fourth octave
               T       Fifth octave (highest)

       Other:
               *       Meter change
               0       Rest














Changing Meter:

At times, some songs will call for a change of speed or meter in the
middle of the song.  In order to accomodate this, a variable for the
meter was incorporated into TAMM.  To change meter, enter an '*' followed
by a number from 1 to 8.  The larger the number, the slower the speed or
meter.

The meter remains constant until it is changed by using the '*'.


Changing Octaves:

TAMM can play a range of notes over 5 octaves.  To change octaves, enter
the appropriate code for the new octave.  The octave remains constant
until it is changed by using one of the above codes.


Changing beats:

The number of beats a note is held is determined by the beat variable.
The beat must be in the range of 1 to 8.  The beat remains constant
until a new beat is entered.


Entering Music Data:

Before a note can be entered, two things must be known: the octave, and
the beat.  Therefore, the octave and beat must be declared before the note
is entered.  If the octave and/or beat are unchanged from the previous
note, then only the changed parameter need be entered prior to the note.

If this seems confusing, look at the following example:

1.5
11.25
*4 O1AAA2AP1gO2A

In the above example, 1.5 is the SCF; 11.25 is the FCF; the meter is set
to 4; the first note is an A sharp in the third octave held for one beat.
The second, third, and fourth notes are the same as the first, therefore,
re-entering the meter, octave, or beat is not necessary.  The fifth note
is held for two beats instead of one, therefore the new beat is entered.
The sixth note not only changes beat, but also octave.

It is easy to see how to code data using notes with a beat down to an
eighth note, but by changing the meter to half its original value, sixteenth
notes can be entered (the duration the notes are held is reduced by 1/2).
This method can be used for other timing constraints you may encounter.

Finally, after the song has played, TAMM asks you if you wish to play
another song.  By entering a 'Y', you will not have to re-execute TAMM
each time.

If you have comments or questions, please contact me.

       Tom Andrews (74016,140)
       1648 Alexander Ct, Apt A.
       Gretna, La  70056
