
This version of VMUSIC superceeds all others prior to Oct. 1988.  A
lingering bug in the timing of pauses has been fixed, and several new
songs have been included.  A provision for setting absolute pitches has
been added;  VMUSIC may now be invoked with three command line arguments:

        1.      Song file name
        2.      Tempo value
        3.      Real number to divide pitches by

Typical for a 12 mh AT might now be

VMUSIC GREEN 0 1.5

Vmusic must have at least the name of the song file on the command line;
it will prompt for one or both of the other two items.

Negative numbers may be used for tempo on really fast ATs or 386 machines.

VMUSIC was first written for PCs and the first ATs (6 mh) and the world
has since moved to 10-12 mh ATs and will be moving to 386 machines.  This
version will sound right on all of them.

The present version should be able to play music for about 25 minutes, ample
for most purposes.  It will output a total count of notes to the screen for
a given song and this count may go as high as 30,000.  For reference, Babylon
goes to about 400 and Lyle Kimball's encoding of Scarborough Fair to
about 2700.

It will be seen that the songs are coded exactly as if for BASIC language "play"
statements with an extra 'v' or 'V' for voice (2 or 3 voices).  The music
produced is true multi-part harmony;  unlike PianoMan and one or two other
well known packages, nothing is being faked here.  The technique is
essentially that devised by Steve Muenter (RocketDyne).

        Most programs which generate tones on  PC's speaker
        simply hook the speaker up to the timer chip,
        leaving the 80x86 chip free to do other things.
        Vmusic controls the speaker directly.  There is a
        port in the PC, one bit of which is a push-pull
        handle on the speaker;  if that bit is 0 and you
        move a 1 to it, or if it is a 1 and you move a 0 to
        it, it moves the speaker back or forward 1 count.

        If you take a number, which you may regard as a
        frequency, and continuously add it into a 16-bit
        register, you will see 1's moving continuously to
        the left until the high-order bit in the register
        gets set (made 1).  If you do this and then zero
        the register WHEN the high-order bit gets set, then
        you will observe that the process is cyclic and
        that the FREQUENCY with which the high-order bit
        gets set will be proportional to the number itself.
        This means that if you multiply your original
        number by 3 and continue the process, then the
        frequency with which that high-order bit gets set
        will have increased three-fold etc.

        The idea is to feed that high-order bit to the port
        bit each time;  you will get one push-pull each
        time the high-order bit gets set, which will be
        proportional to the number you used for a
        frequency.  There are just enough registers in a PC
        to do this three times inside of some kind of a
        timing loop, length of notes times tempo.  The
        proportionality of effect gaurantees that, although
        the ABSOLUTE pitches may be ball-park at best, the
        RELATIVE pitches are perfect.

I would appreciate copies of any music which other people might code up
for VMUSIC, and I would appreciate hearing from anyone able to get VMUSIC
to run under any of the new multi-tasking OSs (particularly UNIX variants)
on 386 equipment, while at least one other process is running.

Ted Holden
HT Enterprises
5001 Seminary Rd. #621
Alexandria, Va. 22311

703 671-4562


