Demonstration Guide

Subsumption Strategy Development of a Music Modelling System
Joanna Bryson, MSc project, September 1992


Basic Step
----- ----

Run the file in the PROJECT directory called "demo".  It is a menu program ---
you can do little harm by just hacking!


Setting Up
------- --

You need to choose a file to work with.  You can use any .fft file
(see user guide).  For the purposes of demonstration I have six 
different songs prepared.

dogsong 		"White City" (Shane McGowan) on mandolin
wedith			an Appalachin folk tune on mandolin
fastpw2			a Celtic folk song on penny whistle
slowpw			a Burns song on penny whistle
malt			"The Boys of Ballimote" on Scottish small pipes
malt_nod		the same, without the drone pipes
scale			the training file for the NOTE neural net (mandolin)

(Helen Lowe on the penny whistle, Manuel Trucco on the pipes)

Choose any of these songs using the "f" option.


To modify the sound output, use the "s" option to call up the SUN
"soundtool" utility.  If the sound is too loud or too soft, adjust
the "Play volume" toggle.  If there is no sound at all, make sure
that "Output to" is set to Speaker (though if you have the right 
adapter, you can use Jack to send it to headphones!)   Note:  soundtool
is MUCH better under sunview than X.


Playing Music
------- -----

There are two ways to play a song --- the "o" option plays the song
as it was originally recorded, and the "p" option plays the output of
this program.  It is often most interesting to play BOTH options 
simultaneously on two adjacent SUN machines.  I recommend setting
the volume for the "o" playing to 36 and the "p" to 83 for a fairly
good blend.  Notice some machines have better sound boards than others...


The real output of these programs is just the chord structure derived, 
but as a point of interest there is an option to the "Noise" program
to also include in the program's interpretation of the melody.  In the 
demo directory I have done this for the dogsong, fastpw2, and malt.
(notice the "melody" is all in one octave, besides the fact that it
is not precisely transcribed, so it sounds a bit odd!)  There is a 
menu for setting these options under the "Noise" menu item, but to 
create your own files you will need to copy the *.fft files into one
of your own directories and use the "c" option to cd there with the 
program. 


Examining the Modules
--------- --- -------

The really interesting thing about this program (from an AI standpoint)
is that its behaviour is achieved using a completely reactive,
behaviour-based system.  It was designed using Rodney Brooks'
"subsumption architecture" -- see his paper "Intelligence without
Representation" in the AI Journal (1991).  Essentially, each necessary
behavioural component of the overall competence is implemented one
at a time and tested.  Then additional behavioural modules are added
on top of these lower level modules, exploiting the information the
lower levels produce or using their own sensors.  The lower level
modules continue to operate exactly as they had before, with no
knowledge of the higher level modules.  These modules ideally operate
in parallel, though of course on this system they are all sequential!
And the program behaves as if it were in real time, although in fact
the translation to and from audio files currently makes this
impossible.

The main part of the demo then (though not the most entertaining part)
is the display of the simplified output of each of the modules.  For a
complete run down of what happening in each of these programs, see the
dissertation (especially the chapter "Module Overview").  If you
select a module, a window will get thrown up to the upper-left part of
the screen... you probably want to move these windows around so you
can compare them.

Here is a brief description of what you can expect to see:

1:  NOTE  --- in the first column, the number of the Fourier time
frame.  These frames are used for frequency analysis - each frame
represents 256 milliseconds of time, and follows the previous frame by
128 milliseconds (so every bit of the original file is presented
twice).  The second column is what NOTE considers to be the most
likely pitch class for that frame.  The third column is not
significant.

2:  CHORD --- takes any number of output frames from NOTE and combines
them together and compares them against templates to get the actual
chord.  This is meant to be run across just a bit of music that would
consist of a single chord, but if you run it from this menu you will
be running it across an entire song, which usually results in the key
of the actual song being the "most likely" chord.  The first line of
output is the weights associated with each of the twelve pitch classes
(starting with A).

3: THRESH --- looks for the beginning of a single note.  It does this
by looking for the beginning of a period of stability in the NOTE
output.  You probably want to put this next to NOTE to compare it.
The first column is the time frames again, and the second is 0, except
it is "1" when it recognises a note threshold.  Notice it takes an
interval of time (currently 8 frames) before it reports stability.
Since the system is supposed to be in real time, the report must be
made this lag behind.  Notice also that THRESH is looking at the whole
output of the NOTE module for all twelve pitch classes, so it may not
look totally consistent from the simplified output of the NOTE
program.

4: BEAT --- takes the output of THRESH and tries to determine the most
likely interval for a note beginning to happen.  The output is the 3
most likely intervals with their associated weights.  Notice this
works by using a normal curve around the actual output to compensate
for timing inconsistencies.

5:  CHANGE --- applies chord across discrete intervals of time as
determined by THRESH events.  There are actually two versions of CHORD
being run, the one that currently seems to be the most likely is in the first
column.  At a THRESH interval, "(beat)" appears as a fourth column,
and the chord which is not currently winning is reset to a blank slate
to check if a new chord has been started.  Compare this next to NOTE
to see how the chords are being chosen.

6: TIMED --- uses the information from BEAT to find the significant
time intervals for the song, and from THRESH to figure out when they
are occurring.  It produces a regular signal (corrected when BEAT tells
it the time has sped up or slowed down, or when THRESH tells it that
the beat seems to have moved) and they are at the actual predicted
beginning of the notes, rather than having the THRESH lag.  The output
looks the same as CHANGE, since this information is used to make
CHANGE change the chords at more significant intervals.  TIMED
"subsumes" THRESH, but CHANGE is oblivious.  Compare this next to
CHANGE to see how the different timings affect the results.



