                               AMI
            An Algorithmic Musical Instrument For MIDI
                   Version 1.0 - 23 April 1988
                          By Mike Yocum

As MIDI (the Musical Instrument Digital Interface) becomes more 
popular, people look for more ways to use it with their computers.  
Sequencers and patch librarians are the most popular programs 
available.  However, one of the more current rumblings heard in 
MIDI circles is "algorithmic composition."  In other words, 
letting the computer compose the music, within the bounds of some 
preset rules.  The rules could conceivably range from a totally 
random choice of notes to the rules of the grand masters.

Don't get the idea that algorithmic composition is a new idea, 
because it isn't.  The first I read of it was in an article by a 
man named John Simonton, Jr., who was the head of a company called 
PAIA Electronics, Inc.  This company was a pioneer in the field of 
computer-assisted synthesis in the late 70's and early 80's.  In 
an article (and accompanying program for the 6503 microprocessor) 
entitled "Pink Tunes," he described his idea of computer 
composition, and its implementation on a PAIA computer/synthesizer 
combination.

"Pink Tunes" utilized an algorithm conceived by Richard Voss of 
IBM.  Without going into a lot of detail, what the algorithm does 
is filter random numbers, in much the way (for you analog synth 
buffs) pink noise is filtered white noise.  This allows randomness 
with an amount of predictability.  Does that sound contradictory?  
Actually, it's very useful to our purpose.

And our purpose here is AMI, which is short for Algorithmic 
Musical Instrument.  AMI is a simple algorithmic composition tool.  
Sometimes, AMI reminds me of wind chimes, other times it reminds 
me of King Crimson during the quiet parts.  It will make for 
interesting background music, or hopefully inspiration for some 
sort of composition.

Using a list of sixteen candidate notes, AMI "composes" 4-part 
harmonies over MIDI.  The sixteen notes are picked by you, or 
loaded from disk from an AMI data file.  This is your element of 
control.  You can make the notes as sweet (harmonious) or sour 
(discordant) as you like.  Where you place the note in the list of 
sixteen candidates makes a difference, too (thanks to the Voss 
algorithm).  Notes near the "top" (note #1) are more likely to be 
played than notes near the "bottom" (note #16).  Note lengths are 
not able to be chosen (the Voss algorithm does that), although 
overall tempo of the "piece" is (via the tempo slider).

For AMI, I've used a very simple note language.  The note language 
looks like this:

                       note[modifier]octave

Where "note" is a note name: c, d, e, f, g, a, or b.  Upper or 
lower case accepted.
Where "modifier" is an optional + or - to make "note" sharp or 
flat, respectively.
And where "octave" is a MIDI octave specifier between 1 and 8.

Examples of the note language are: C5, d+6, e-7, F8, and so on.

The best way to understand this is to simply load in an AMI data 
file (files that have an ".AMI" extender) and have a look at a 
working note list.  AMI is smart; its parser will not let you 
enter an incorrect note value.

AMI uses MIDI channels one through four to transmit its tunes to a 
synthesizer.  You can choose what voice in your synth (1 to 128) 
that AMI uses to play each channel, given that you have a multi-
timbral synthesizer.  I own a Casio CZ-101 synth, which I really 
like.  One thing that bugs me about the CZ-101, though, is that 
the voice arrangement is a little odd.  There are three banks of 
voices in the CZ; preset, internal, and cartridge.  However, 
they're not numbered logically.  The 16 preset voices are numbered 
1-16.  The internal 16 voices are not numbered 17-31 like you'd 
think (these numbers wrap around to the preset bank again), but 
32-47.  And the 16 cartridge voices are 64-79.  I added a filter 
to allow the CZ-101 to respond the way you'd expect.  If you 
select "CZ-101" from the "Options" menu (it will show a check mark 
beside it if it's selected), the voices will be numbered as 1-16 
(preset), 17-31 (internal), and 32-47 (cartridge).  If you don't 
use a CZ-101 or CZ-1000, forget this option.

I also included a switch under the "Options" menu called "Safety."  
This allows you to turn the "Are you sure?" type alert boxes off 
as you get more used to AMI.  I wish more software would include 
this feature.

There is an on-line help screen.  It's available by choosing 
"Help" from the "Options" menu, or by hitting the "Help" key.  If 
you're in the edit mode, you can click on the "Help" button in the 
dialog box.

AMI will work on color (medium resolution) or monochrome systems.  
This is something else I wish more software would allow.

I wrote AMI with the new Laser C development system by Megamax.  
It's a wonderful development environment for the ST, and Megamax 
has excellent technical support.  I highly recommend it.

AMI is copyrighted, but free.  Feel free to upload it to BBSs, put 
it in your clubs PD library, or whatever.

I'd like to thank the people who helped me on AMI (directly and 
indirectly).  They are:

Joe Lambert -        beta tester, current president of STING,
                     the ST INformation Group in Peoria, IL, and
                     a good friend
Larry Richardson -   beta tester and active member of SCAT, the
                     Suburban Chicago ATarians
John Simonton, Jr. - wherever you are, for inspiration
Craig Anderton -     for friendly, easy to read, and informative
                     technical writing
Tom Hudson -         for great, thoughtful programming, and
                     contributions to the Atari community
My wife Karen -      for love and support

Write to me with your opinions on AMI.  I'd like to hear about 
what you think of it, or any bugs you encounter.  I'd especially 
like to see any interesting AMI data files you've created.  The 
AMI data file format is ASCII, and could easily be merged into 
most word processors (it works with 1st Word and Word Writer ST).  
My address is:

Mike Yocum
11 Forest Hill Drive  #104
Glen Ellyn, IL  60137
(312) 469-4490

GEnie address: MIKE.YOCUM
CIS user ID: 70375,1255

Let's all support the ST and make it the best it can be.  Join a 
user group (if you haven't already), and help out in any way you 
can.  Be a proud, contributing member of the ST community.

