
                            ST - MUSE 2
                            
            A Graphical/Algorithmic Compositional Program
                          for the Atari ST

           Copyright 1995 - MEGASTAR SYNTHESISER COLLECTIVE
                            Version 2.1

         Program written and compiled in GFA Basic Version 3.5
                          by GARETH JONES

            'Mon Petite Echantillonneur' Janine Dupont


     This program is not in the Public Domain and futher distribution is
prohibited. All material on this disk is copyright. It may not be copied or
altered in any way without the permission of the author.

In the STMUSE2 folder you should find the following files-

   STMUSE2.PRG - The Main Program.
    STM2NS.PRG - The Sampleless version of the Main Program.
   STMUSE2.TXT - This document.
   MUSEMSC.PI1 - Colour MSC picture.
   MUSEMIR.PI1 - Colour Intro picture.
   MUSEPIC.PI3 - Mono Intro picture.
     GRID2.PI2 - Colour Grid picture.
    MGRID2.PI3 - Mono Grid picture.
  WHOLESAM.SAM - Samples.
           SCL - folder containing example Scale files.
           MSE - Folder containing example ST-MUSE files.
           MID - Folder containing example Standard MIDI Files.

    To run this program you will need an Atari ST working in low ( colour )
or high ( monochrome ) resolutions ,and a MIDI synthesiser. Best results
will be obtained if the synthesiser is multi-timbral and can support six or
more MIDI channels. However the program is perfectly happy to work with a
smaller system, even down to a single channel.



ABOUT ST-MUSE
*************
    ST-MUSE is an algorithmic MIDI music composer that uses simple
mathematical sequences and digital logic to generate its output. It is best
suited to producing repeating polyphonic sequences or, slowly evolving
melodies and accompaniments.

    I first came across a desciption of the "MUSE" in Hal Chamberlin's book
"Musical Applications of Microprocessors" ( Hayden Book Company, IBSN 0-8104-
5753-9 ). The "MUSE" was a analogue music composition machine which the user,
by using combinations of switches and levers, would control a digital sequence
generator, which would in turn control the pitch output of a voltage
controlled oscillator.
    The machine would generate a number of binary digital signals from various
counters, 31-stage shift register, and 0 and 1 logic lines. Then via the
switches, these signals are combined to control a parity generator ( which in
turn controls the output of the shift register ) and, through scale transition
logic, a 5-bit digital to analogue conveter connected to the oscillator.
Changing the switches would sometimes produce fixed sequences of notes,
trills, long non-repeating melodies, or just random notes.
    In this digital simulation all the counters, shift registers, scale
transition logic, etc. are software generated, and the output is MIDI note
data. I have "improved" on the original machine by adding polyphony, more
counters, random elements, plus extensive control of scales, transpositions,
MIDI channels etc. For Version 2 I have added a number of extra features
including - more Sets, Scales, longer Set Sequences, the abilty to save
Standard MIDI files, and a General MIDI editor.


HOW IT WORKS
************
    In this digital simulation there are 4 types of signal generators that
drive the data lines, COUNTERS, SHIFT REGISTER, RANDOM, and FIXED. There are 3
different counters used in ST MUSE, a 7-bit ascending counter, a 7-bit
decending counter, and 6-bit divide by 3 counter. The Shift Register is a
32-bit type which is driven by the output of the PARITY GENERATOR, and is
clocked at half the rate of the COUNTERS and RANDOM data lines. There is a
5-bit random number generator, and finally two data lines permanently set at 1
and 0.
    The data lines from the signal generators control, via the virtual
switches, up to 6 MIDI Voices, a Parity Generator, Set Sequencer, and a
Rythym controller. Each of the MIDI Voices is driven by a 4-bit number ( 0 -
15 ), derived by the sum of the connected data lines. Number 0 is correponds
to a rest and numbers 1 - 15 each correspond to a note of a selectable scale.
In addition to this Voices 5 and 6 can be switched, via the MODE page, to give
delayed versions of Voice 4.
    All 6 sets of Voice parameters, MIDI Channel, Note Velocity, Scale Root,
Octave Transposition, and Note Scale can all be programed together as a SET.
Up to 6 SETs can be programmed on the SETS screen, selectable from the main
screen. In addition the preset Voice Scales there are 12 user programmable
Scales, which are set on the SCALES screen.
   To increase the amount of variation in the music ST MUSE includes a SET
SEQUENCER screen. Here you can control directly ( from the data lines ) or
in sequence ( via a programmable number of clocks ) of up to 64 steps, which
SET controls the output of the 6 MIDI Voices.
   Also included is a General MIDI/Roland GS editing screen where you edit
your synth's parameters as you program the music.


MIDI WARNING

    Unfortunately it has been found that if MIDI equipment was attached to the
"MIDI In" socket of the ST, then any MIDI messages received while ST_MUSE
was replaying samples ( ie during the intro screens ), would freeze the
program. Therefore it is recommended that users with set-ups that have the
"MIDI In" socket permanently connected should use the STM2NS.PRG sampleless
version of the program.



******************
GUIDE TO FUNCTIONS
******************

MAIN SCREEN
***********

     EXIT :Returns you to the desktop.

VOICE 1-3 :Displays the current Grid Switches that control Voices 1 to 3.

VOICE 4-6 :Displays the current Grid Switches that control Voices 4 to 6.

 CONTROLS :Displays the current Grid Switches that control the Parity
           Generator for the Shift Register, the SETS selection, and the
           Rythym function.

     MODE :Displays the MODE screen where the controls data for Voices 5 and
           6, the Shift Register, and Set Bit functions are displayed.

 SEQUENCE :Displays the SET SEQUENCER screen.

    SCALE :Displays the PROGRAM SCALE screen.

 GEN MIDI :Displays the GENERAL MIDI screen.

   RYTHYM :Displays the RYTHYM EDIT screen.

     PLAY :Plays back over the MIDI socket, the music generated by the current
           settings of the program. A left mouse click will generate the same
           sequence of random numbers, therefore the resultant music will
           always be the same. However a right-click will produce a dialogue
           box which gives the user the option of initialising the Counters,
           or Shift Register with a random number. This is stored by the
           program and used every time the PLAY button is left-clicked.

    TEMPO :( 10 - 99 )
           Sets the basic speed of the playback.

    CLOCK :( 0 - 24 )
           Sets the number of MIDI clocks (if greater than zero) sent out per
           counter step. This function also controls the note length of each
           counter step in a Standard MIDI file. For example if "CLOCK" = 12
           MIDI clocks then each counter increment equals one quaver, and 24 =
           1 crochet ( quater-note ).



SET SCREEN PARAMETERS
*********************

SET SELECT :( "SET 1" - "SET 16" )
           Selects the currently operating SET of Voice values.

     NAME :( "SET 1" - "SET 16" )
           This function allows the user to enter up to a 10 lettered name for
           the currently selected SET. To finish enter "Return.

     CHAN :( 1 - 16 )
           Gives the MIDI channel for each Voice.

     TRAN :( C - B )
           Controls the transposition in semi-tones, of the Voice.

     OCTV :( 0 - 6 )
           Controls the transposition in octaves, of each Voice.

     VELC :( 10 - 99 )
           Controls the MIDI velocity of the notes on each Voice.



PROGRAM SCALE SCREEN
********************
Scales are programmed in semitone steps ( 1-35 ) from the root note ( 0 ).

SELECT SET :( 1 - 12 )
            Selects which of the 6 programmable scales to be displayed.

SCALE NAME :( "_Scale_1__" - "_Scale_12_" )
            This function allows the user to enter, via the keyboard an ten
            lettered name for the currently displayed scale. Enter "Return"
            to finish.

      SAVE :( .SCL )
            Saves to disk all 12 programmable scales, together with their
            names.

      LOAD :( .SCL )
            Loads into the program the 12 programmable scales and names that
            have been previously saved with the .SCL extention.



SET SEQUENCE SCREEN
*******************

SEQUENCE MODE: ( DIRECT or SEQUENCE )
           This function controls how SETs are selected. In DIRECT mode the
           Set selected is directly controlled by the numbers generated from
           repective values Grid Switches ( e.g. a 1 will select Set Location
           1 etc , whereas a 0 will produce no change in the current SET
           selection ). In SEQUENCE mode the programs starts with the SET in
           Set Location 1. Then after a set length of time, moves on to Set
           Location 2, then SET 3 etc, until a sequence reset ( "----" ) is
           met when it returns to the SET in Set Location 1.

  SEQ.CLK :( 4 - 99 )
           When in SEQUENCE mode this sets the rate, in counter clocks, that
           the sequncer moves through the Set Locations.

SEQUENCER LOCATION:( 1 to 16 )
           Selects which SETs are called, in order, by the sequencer. Or
           generates a sequencer reset ( "----" ).

       <> :( 1-16, 17-32, 33-48, 49-64 )
           Displays the 64 Set Locations in blocks of 16 by using the left
           and right mouse buttons.



MODE SCREEN
***********

   SET BITS :( 0 or 1 )
             Enables the user to set the initial values, bit by bit, for
             the Shift Register the forward counter and the triplet counter.

 VOICE MODE :( DIRECT - DELAY )
             This function for Voice 5 and 6, sets the source of Voice Numbers
             that controls the pitch. When in "DIRECT" mode the numbers are
             generated from the Grid Switches. However in "DELAY" mode the
             numbers are a delayed copy of the Voice Numbers generated for
             Voice 4.

      DELAY :( 0 - 15 )
             Sets the length of delay, in counter steps, between Voice 4 and
             Voice 5 or 6 when they are in "DELAY" mode.



RYTHYM SCREEN
*************

RYTHYN MULTIPLIERS :( 1 to 15 )
             Sets the skip time, in counter steps, between the generation of
             one set of Voice Numbers and the next ignoring any counter or
             register changes inbetween.



GENERAL MIDI SCREEN
*******************
     INIT :Resets all the General MIDI and GS parameters to their standard
           values and transmits the changes over MIDI.

 TRANSMIT :Transmits over MIDI, all the currently displayed GM/GS values.

     SAVE :Saves all the General MIDI data as a file with a .GMF extension.

     LOAD :Loads a previously saved General MIDI file with a .GMF extension.

G.M. EDIT :( Piano1 - Gunshot )
           Sends MIDI Program Change messages 0 - 127.

   VOLUME :( 0 - 63 )
           Sends MIDI Volume commands ( controller No.7 ) data, 0 - 126.

      PAN :( 0 - 63 )
           Sends MIDI Pan commands ( controller No.10 ) data.

   CHORUS :( 0 - 63 )
           Sends GS Chorus Depth ( controller No.93 ) data.

   REVERB :( 0 - 63 )
           Sends GS Reverb Depth (controller No.91 ) data.

     EXIT :Return to the main screen



DISK SCREEN
***********

LOAD

  MUSEFILE :( .MS2 )
            Loads into the program the complete set of ST MUSE 2 and General
            MIDI data, ready for playing. Note - files created by the P.D.
            version of ST MUSE are unfortunately not directly compatable
            with MS2 files.

    SCALES :( .SCL )
            Loads into the program the 12 programmable scales and names that
            have been previously saved with the .SCL extention.

  GEN MIDI :( .GMF )
            Loads into the program all the General MIDI parameters that have
            been previously saved with the .GMF extention.


SAVE

  MUSEFILE :( .MS2 )
            Saves complete set of ST MUSE 2 and General MIDI data as a single
            MUSE file with the .MS2 extension.

  MIDIFILE :( .MID )
            Saves the first 1000, 2000, 5000, ( Selectable from a dialogue
            box ) MIDI events as a Standard MIDI file with a .MID extension in
            a format set by the MFILE parameters

    SCALES :( .SCL )
            Saves to disk all 12 programmable scales, together with their
            names as a .SCL file.

  GEN MIDI :( .GMF )
            Saves to disk all the General MIDI parameters as a single file
            with a .GMF extension.


MFILE DATA

     FORMAT :( 0 - 1 )
             Sets the format of the MIDI file. Either as a single track -
             format 0, or 17 track - format 1.

        RES :( 96 - 480 )
             Sets the timebase of the saved MIDIfile.

   G.M.DATA :( NO - OK )
             When this feature is selected then the General MIDI values,
             as displayed on the GENERAL MIDI screen, are incorporated
             at the start of the MIDIfile.

      NAMES :( NO - OK )
             If Format 1 is selected then the operator is able to include
             the GM/GS names of the instruments in the saved file.



USING THE MOUSE
***************
     All parameters can be altered using either the left or right mouse
buttons. To change a value just position the pointer over the corresponding
button and use the left button to raise ,the right to lower. This makes
ST-MUSE a very easy program to operate.


GETTING STARTED
***************
     First make sure that the MIDI OUT socket of you ST is connected to the
MIDI IN socket of your sound generator and that no active MIDI equipment is
connected to the MIDI IN socket of the ST ( if the ST receives a MIDI signal
while it is replaying a sample, the program will freeze ). Then run the
program by double-clicking STMUSE2.PRG. After the introductional pictures
and samples, the program will display the main screen. Along the top of the
screen are displayed all the main controls and screen selection buttons. Below
on the grid is shown the switch settings for the CONTROLS functions.
     Now using the mouse, left-click the PLAY button. At this stage no sound
will be produced. However, just above the grid, the changing status ( 0 or 1 )
of all the data lines will be displayed. To stop PLAYing use the space bar on
the ST keyboard. Now try right-clicking the PLAY button. Instead of
 immediately going into PLAY mode a dialogue box appears. This gives the user
the option of selecting a initial random value ( instead of zero ) for the
counters, shift register, or both together. Once this is done PLAYing
commences. The ST MUSE will automatically retain these initial values whenever
the PLAY button is left-clicked, until the right-click option is selected
again.

     Clicking on the VOICE1-3 button will display the switch settings for
the 3 MIDI voices. We can now alter these to generate some music.
     You will observe that all the switches have been already been set to the
'Fixed 0' data line. This means that Rests are constantly being generated for
all 3 voices, hence the reason why no music was being produced by PLAYing
earlier. Now move the top switch of VOICE 1 ( the least significant bit ) from
the 'Fixed 0' to the 'Fixed 1' data by clicking the vertical line to the right
of the switch. Then left-click the PLAY button. The program will permanently
set VOICE 1 to the first note of the scale ( value 1 ) resulting in a
sustained C1 note which will cease when the space bar is pressed.
     Reset the top switch to 'Fixed 0' and move the switch below on to the
'Fixed 1' data line. PLAY this time will produce the second note of the scale
( value 1 ) D1. If both the top two switches are set to 'Fixed 1' data line,
then E1 ( value 3 ). Then experiment use all four switches set to either 1 or
0 to generate all 15 notes of the scale ( C major ).
     To experiment with the COUNTERS set the 3 lowest switches of Voice 1 back
to 'Fixed 0' and the top switch to the Ascending Counter data line '1'
immediately to the left of the 'Fixed 0'. PLAYing will now produce a pulsing
C1 note which sounds every time the '1' data line displays 1. Moving the
switch left to the '2' data line will produce the same C1 note but it will
pulse at half the previous rate. Now set the top switch to '1' and the switch
below to the '2' data line. The resultant music will be a four note sequence
( value 1 to 4 ) starting with a rest, then C1, D1, and E1. Moving the 3rd and
4th switches to the '4' and '8' respectively will produce a rest followed by
an ascending two octave C major scale. Experimenting with the switches set in
in the COUNTERS region alone will produce complicated scales and arpeggios.

    To improvise with the Shift Register and the Parity Generator first
ensure that all Voice switches are set to 'Fixed 0' data line, then click
the CONTROLS button. The program should now display the grid switches for the
Parity Generator and the Sequencer. Then set the top switch to ascending
counter data line '2' and the remaining 3 switches to 'Fixed 1'. This
particular arrangement means that the current status of the data line selected
by the top switch is fed directly into the Shift Register. PLAYing will result
in a procession of 1s and 0s moving right to left down the Register. Moving
the top switch to Ascending Counter data line '4' will produce alternating
pairs of 0s and 1s. If the bottom 3 switches were set to 'Fixed 0', the
signal from the selected data line would now be inverted.
     Now move the top switch of the PARITY controller to Shift Register data
line '8'. With the remaining switches on 'Fixed 1', you are creating an
8-stage positive feedback loop where the status of the '8' data line is fed
back into the Shift Register, generating a repeating 8 bit pattern. This
coupled with the randomise Shift Register function avilable from right-
clicking PLAY enables the user to generate a whole series of 8 bit sequences.
If the bottom 3 switches are now set to 'Fixed 0', a negative feedback loop
will be created. This results in a 16 bit pattern the second 8 bits will be
the inverse of the first.
     Placing several switches in the Shift Register data lines allows you to
produce multiple feedback loops generating complicated sequences of numbers.


DEMONTRASTION FILES
*******************
RIPPLES  - Uses switches only in the COUNTERS section to produce a series
           of ascending and decending scales at different rates.

RANDSQ1  - Use the "Randomise Shift Register" function ( by right-clicking the
           PLAY button ) to generate different repeating 16 note sequences. If
           you require a different length sequence then, on the CONTROL screen
           , re-position the switch in the Shift Register section ( currently
           on data line 16 ) to the required number.

RANDSQ2  - Similar to RANDSQ1 but now with 3 Voices. Try, via the SET screen,
           setting each Voice to a different MIDI channel and a different
           sound.

  CANON  - This file generates a never-ending 3 part canon. COUNTERS and
           RANDOM elements are fed into the Parity Generator to produce an
           ever-changing output which is turned into note data for Voice 1 by
           the placing of switches at data lines 1,2,3, and 4 on the Shift
           Register section. The switches for Voice 2 and 3 are placed futher
           down the Shift Register so that the Voices, after a set delay,
           play the same data. To enhance the canon effect, each Voice is set
           at a different octave.

SYNCECHO - A mix of RANDSQ1 and CANON_D with a 24 note sequence with 2
           syncopated echoes. The echoes are generated by shifting the
           swicthes for Voice 2 and 3 futher down the Shift Register and
           reducing the MIDI Note Velocity in the SET parameters. To get the
           best out of this file, obviously you must use a fairly velocity
           sensitive sound on your sound generator.

RAND_SR  - This is a method of generating an evolving sequence of numbers.
           The file uses multiple feedback loops to control the Shift Register
           output. In this case all the feedback loops are prime numbers, so
           the sequence will be very, very long. The selection of different
           feedback settings ( especially if one of the switches is set to
           a COUNTER or FIXED VALUE ) can result in a steady state, either a
           repeating sequence or single value, being reached.

SEQUENCE - This file makes use of the SEQUENCER to control the selection
           of SETs tp produce a chord based sequence. The Voice settings
           produce a semi-random set of arpeggios with a pulse bass line.
           You can see on the SET screen there have been 4 SETs programmed,
           each corresponding to a different chord. Then on the SEQUENCE
           screen you can see the order in which these SETs are called up in.
           Also you see that it is in SEQUENCE MODE so the SET will
           automatically change every after x number number of counter
           clocks.

   XFILE - Uses the DELAY functions available on the MODE screen to generate
           the values for Voices 5 and 6.



MIDIFILE CONVERSION

     The music that generated by ST MUSE 2 can be saved as a Standard MIDI
File ( Format 0 or 1 ) which includes all the note information, General MIDI
parameters and General MIDI names. To generate a MIDIfile from ST MUSE
select DISK screen by clicking "DISK" button on the Main screen. Then you use
the four MIDIfile parameter buttons to select the MIDIfile data you require
to save.  "FORMAT" allows to choose between Format 0 and 1 MIDIfiles.
"RESOLUTION" sets the timebase value of the MIDIfile. Consult your sequencer's
manual to select which is the most suitable settings. Then select if you want
to incorporate the currently programmed General MIDI parameters into the file.
Finally if you are saving in Format 1 you can include the Genral MIDI
instrument names into the MIDIfile. To save the file to disk use the "SAVE
MFILE" button.
     Because of the way the program generates the data Format 1 files take
longer than Format 0. So if the picture areas are near to their maximum be
prepared to wait up to 2 minutes before saving is finished.
     The approximation of the MIDIfile tempo relies largely on "CLOCK" setting
on the main screen. This parameter sets the number of MIDI clocks per step,
and hence the duration of a MIDIfile note. For example, if "CLOCK" was set to
12 MIDI clocks per step, then the resultant MIDIfile note would be a quaver
long. However if "CLOCK" equalled 24 MIDI clocks, then a crochet (
quarter-note
) would result. So with a judicious setting of "CLOCK" and
sequencer tempo adjustment most ST MUSE 2 compositions can be recreated.

FORMAT 0 - 1 Track
     Time Base   96-480ppqn   At start of track
     Time Sig.   4/4                   "
     Tempo       10 - 200 BPM          "
     GM\GS data                        "

FORMAT 1 - 17 Tracks
     Time Base   96-480ppqn   At start of Tempo track 1
     Time Sig.   4/4                   "
     Tempo       10 -200 BPM           "
     GM\GS data               At start of each of the remaining 16 tracks.
     Instrument names                  "



SCALE DATA
**********
Notes relative to C1 as root of scale.
                1   2   3   4   5   6   7   8   9  10  11  12  13  14  15

        MAJOR  C1  D1  E1  F1  G1  A1  B1  C2  D2  E2  F2  G2  A2  B2  C3
        MINOR  C1  D1  D#1 F1  G1  G#1 A#1 C2  D2  D#2 F2  G2  G#2 A#2 C3
       DORIAN  C1  D1  D#1 F1  G1  A1  A#1 C2  D2  D#2 F2  G2  A2  A#2 C3
       ARABIC  C1  D1  E1  F1  G#1 A1  B1  C2  D2  E2  F2  G#2 A2  B2  C3

   PENTATONIC  C1  D1  E1  G1  A1  C2  D2  E2  G2  A2  C3  D3  E3  G3  A3
         BLUE  C1  C#1 D1  D#1 E1  G1  G#1 A1  C2  C#2 D2  D#2 E2  G2  G#2
      GAMELAN  C1  E1  F1  G1  B1  C2  E2  F2  G2  B2  C3  E3  F3  G2  B2
     JAPANESE  C1  E1  F1  A1  B1  C2  E2  F2  A2  B2  C3  E3  F3  A2  B2

    CHROMATIC  C1  D1  E1  F#1 G#1 A#1 C2  D2  E2  F#2 G#2 A#1 C3  D3  E3
    SEMI-TONE  C1  C#1 D1  D#1 E1  F1  F#1 G1  G#1 A1  A#1 B1  C2  C#2 D2
 MAJ ARPEGGIO  C1  E1  G1  C2  E2  G2  C3  E3  G3  C4  E4  G4  C5  E5  G5
 MIN ARPEGGIO  C1  D#1 G1  C2  D#2 G2  C3  D#3 G3  C4  D#4 G4  C5  D#5 G5

  MAJ 7TH ARP  C1  E1  G1  B1  C2  E2  G2  B2  C3  E3  G3  B3  C4  E4  G4
  MIN 7TH ARP  C1  E#1 G1  A#1 C2  E#2 G2  A#2 C3  E#3 G3  A#3 C4  E#4 G4
      7TH ARP  C1  E1  G1  A#1 C2  E2  G2  A#2 C3  E3  G3  A#3 C4  E4  G4


CLOSING
*******
     If you have any queries or comments about this program please don't
hesitate to write to me at the address below. Any donations, suggestions,
etc. would be gratefully accepted.

    26th May 1995
    Copyright Megastar Synthesiser Collective.

Write to :
          Mr. G.W. Jones .
          36 Tarn Drive ,
          Creekmoor ,
          Poole ,
          Dorset ,
          BH17 7DQ ,
          Great Britain .


BYE  BYE  !

The Megastar Synthesiser Collective - "We Synthesise, Therefore We Are"

DISCLAIMER- Mr G.W. Jones and the MEGASTAR SYNTHESISER COLLECTIVE take
            absolutely no responsibilty for any resultant damage to hardware,
            software, data, or state of mind of anyone running one of their
            programs.    "NOTHING TO DO WITH US GUV!"
