
  -------------------------------------------------------------------------
  Docfile MIDI ComposerTool/ChordSequencer alias midichords (v3.2) febr.'93
  -------------------------------------------------------------------------

  In order to work correctly the code expects the following files to be in
  the same directory (or on the root of a disk): - midichords
                                                 - pointmod.file
                                                 - blscrmod.file
                                                 - sqscrmod.file
                                                 - scscrmod.file
                                                 - mcdocmod.file
                                                 - Seqfile 1
                                                 - 7 loadable samples
  wherever the program itself (midichords) is copied to. Whenever the code
  saves Seqfiles to disk, it will be to that same directory (or that root).

  All MIDI data are send to your synthesizer by means of the serial device,
  the data themselves are nothing more than Note On/Off command sequences.
  All synthesizers however, require that the received data are send at a
  very specific (high) speed: 31,250 bytes/second. This is the standard
  baudrate for any MIDI message. Since the code makes use of the serial
  device to send the MIDI data to your MIDI-interface (which in turn will
  actually send the data to your synthesizer) you might need to adjust the
  baudrate for your serial device to: 31,250 bytes/second. This can easily
  be done in your Preferences-program or by clicking on that telephone-icon
  on your Workbench which is called: Serial. The precise setting of your
  serial device should be (while you're at it):

             Baudrate: 31250           Buffer Size: 512
             Read Bits: 8              Write Bits: 8
             Stop Bits: 1              Parity: None
             Handshaking: None.

  Save these values and the code will work fine. After copying all required
  files to the same directory (or some root) the program will start after
  clicking its icon or after typing "midichords" in the CLI, provided
  you changed the active directory to the one where you copied the program
  and its files to. This can be done by using the cd command in the CLI.

  Once the serial device is correctly set, this program will enable you to:

        - Play any chord with a simple mouse click in 9 different scales.
        - Get the played chord, notes and MIDI notenumbers displayed, also
          a display of which keys to press on your synth may be produced.
        - Find any chord which matches 2, 3 or 4 notes in a selected scale.
        - Create small sequences of chords by copying them into one of
          the 8 possible buffers: (BLOCKS) B1 --> B8, each block containing
          up to 24 entries (chords) in a sequence as a maximum.
        - Create larger sequences by arranging these blocks themselves in a
          sequence of 24 entries (blocks) and again this is a maximum.
        - Load and save socalled Seqfiles, containing all vital information
          concerning the specific sequence you created. (see PS.1)
        - Send the contents of a Seqfile to your printer (when connected).
        - Play the selected and sequenced chords by clicking your mouse,
          or play any loaded Seqfile repeatedly in auto mode.
        - Affect the way the notes are played by means of an adjustable
          delay between the MIDI note-messages, creating arpeggio's.
        - Switch the playmode from MIDI out to the soundchips of the Amiga.
          However, no efforts were made to expand this output further since
          it was only built in for those amongst you, who are neither in
          possession of a MIDI-interface nor synthesizer. So go out and get
          yourselves hooked on MIDI to do justice to me and my code...!!
          (Oopsh: you may now also load one type of Sonix *.instr samples.)
        - Switch from 4 to 8 notes played each chord in both output modes.
        - Play SuperChords: chord + same chord a QUINT higher, be careful
          with this one though... (see PS.3)
        - Create music using randomly choosen chords in any selected scale.
        - Search for chords with about the same harmonical contents (notes)
          as any chord selected.
        - Play up to 24 buffered chords by pressing the keys of your Amiga.

  The best way to get to know these different functions and buttons is to
  experiment with the program itself, and while at it, some reading of the
  information given after each succesful keyclick might be useful too...

  If you're anxious to know more, you'd better read the following tutorial:

  At the very start of this code (as soon as everything is loaded) a short
  MIDI test is performed to check your MIDI connections. So if your synth
  is switched on reception of MIDI and the correct baudrate is set, you
  should hear some sounds played by your synth. As already mentioned the
  program will only be sending Note On/Off messages, which means that you
  will be staying in full control of all other available synth functions.
  If this MIDI test fails to produce any sounds from your synthesizer, you
  will have to adjust the baudrate used by the serial device...

  Once the MIDI test has been performed you will be facing a screen which
  belongs to the socalled Block Mode (BM) of the program. A similar screen
  is displayed whenever the program is in the Sequence Mode (SM), so try
  clicking with your left mouse button on the gadget called SEQUENCER
  which is located at the bottom right of the BM-screen. As soon as you
  managed to do that, you will be facing the SM-screen from where you can
  only exit by clicking with your left mouse button on the gadget EXIT,
  right beneath your pointer (after clicking on SEQUENCER). Now click on
  EXIT to return to the BM screen, leaving the SM screen as it is for the
  moment... Assuming the BM screen is facing you, move your pointer to the
  blue-white-grey panel, right above the keyboard on screen. Whenever you
  click the left mouse button (while the pointer is on this panel) one of
  all possible chords is played and all essential information about the
  played chord is displayed in the blue panel at the bottom left. Clicking
  the right mouse button (instead of the left one) will result in playing
  the same chord, however, the third note and the fourth note of the same
  chord are SHIFTED one octave downwards. Which button you pressed is also
  displayed in the information panel: the fundamentals of all unshifted
  chords are displayed in capitals, while those of the shifted chords are
  displayed normally. Right above this chord-matrix, a small bar is placed
  at the top of the screen, serving the purpose of TUNING your synthesizer
  by means of sending one selected note in 3 different octaves. The actual
  tuning and fine-tuning can then be performed by using those controls of
  your synthesizer. As long as you hold the left mouse button depressed
  (while the pointer is on the tuning-bar) the tuning notes are send to
  your synth, which is also the case for any chords played in that panel
  below the tuning-bar: releasing the depressed mouse button will stop the
  playing of the chord. Now, click on the tuning-bar with the right mouse
  button, turn on the AUDIO of your Amiga and click some chords... You'll
  notice that the turquoise LED (directly to the right of the tuning-bar)
  changed to pink indicating your use of the Amiga soundchannels. In this
  mode there is no transmittance of any MIDI messages to your synth at all.
  Clicking on the tuningbar with the right mouse button (again) will switch
  this mode off and restore the pink LED to turquoise, indicating you're
  back into MIDI mode. Now click with the left mouse button somewhere on
  the keyboard and play any chord...! What you did is set a specific DELAY
  between the played notes ranging from 0.02 to 1 second, the selected
  amount of delay is on display in a blue field on the control panel to
  the right of the screen. Clicking with the left mouse button somewhere
  on the keyboard again will reset the delay to 0 and the display on the
  control panel will change to: -- ,indicating there's no delay set.
  Whenever a delay is set, the bottom line of the screen will change from
  black to red and the amount will be displayed on the control panel by
  means of numbers between 1 and 49. You can easily set the amount of
  delay by clicking on a specific key of the keyboard, clicking on the far
  left key will set the delay to 1 and clicking on the far right key will
  set the delay to its maximum: 49. At this point it's wise to play around
  a bit with these delay-settings, so try some different settings to hear
  your chords played in the ARPEGGIO-style... Now clicking somewhere on
  the keyboard with the right mouse button will cause the program to enter
  the CHORD-SEARCH-MODE indicated by the color change of the pointer. At
  the far right of the control panel (right after the word: plus) you will
  be asked to INPUT the notes, you want the program to find the matching
  chords to. Input the first note by clicking with the right mouse button
  on a specific key of the keyboard, whereafter you will be asked to input
  the second note. Do that by clicking with the right mouse button on some
  other key in the neighbourhood of the first key, and from this point on
  the choice is up to you: if you only want the program to search for a
  chord matching TWO notes click on your left mouse button twice to cancel
  the input of the third and fourth note. If you need to find some chord
  matching THREE notes just enter the third note the same way as you did
  with the previous two: clicking on some key with the right mouse button,
  then click just once with the left mouse button to cancel the input of
  the fourth note. When the program is searching for chords matching 2 or
  3 notes there are always more possibilities than one and therefore all
  matching chords will be presented to you one by one at each click of
  your left mouse button (as long as the code finds any matching chords).
  When the program is no longer searching the color of the pointer will
  be restored to the color it had before, which indicates that the pointer
  is free to move outside the keyboard again. Since all found chords are
  displayed on the keyboard as well, it's wise to move the pointer away
  from the keyboard area of the notes you entered while the program is
  in search of the 2 or 3 notes matching chords. The pointer might be in
  front of the key-display... If you need to find the chord belonging to
  FOUR specific notes you just input all 4 notes whereafter the program
  will search for the FIRST chord which contains these 4 notes and that
  chord will be presented to you. Though the key-display itself will be
  wiped out, all relevant information will be preserved in the blue panel
  at the bottom left of the screen. If no matching chord can be found, you
  could try to switch to another scale and reenter the chord-search-mode.
  Switching the scale is done by clicking with the left mouse button on
  the gadget SCALECTOR (right above the SEQUENCER gadget on the control
  panel) whereafter you are invited to select another scale by clicking
  the left mouse button on any of the offered possibilities at the bottom
  of the screen, the default being Yonic which is the most used scale in
  Western music. Clicking on the long bar below the scale-gadgets will
  not affect the selected scale itself, it only acts upon the way each
  chord will be played (SuperChords), until this bar is clicked left again.
  Pressing the Amiga keys will play the chords as displayed on the right.
  Anytime you'll find the scale selected for the chord-matrix displayed on
  the BM screen on the control panel (at the right) in capitals, whereas
  the scales of the buffered chords will be displayed normally below the
  scale-indication for the chord-matrix. Right above the gadget labeled
  SCALECTOR, you'll find another gadget, which controls the key display
  of the actual played keys on the keyboard, whenever a chord is selected
  from the chord-matrix. So click the left mouse button on SHOW KEYS and
  play some chords to see what happens to the keyboard on screen... You
  can switch the key display off again by clicking with the left mouse
  button on the same gadget (which will read at this point: HIDE KEYS).
  Let's switch the key-display off for the moment and continue with a
  more interesting part of the program: the CHORD-BUFFERING. At the bottom
  of the screen in the middle there's a blue bar with the indications:
  B1 B2 B3 ... B8 facing you. That block Bx which is printed in red at the
  moment is the active and current buffer. (If you've been following this
  tutorial so far, the current buffer will probably be B1.) Now, click any
  mouse button on the chord-matrix: as usual, you'll see the selected chord
  and its notes (as well as the corresponding MIDI notenumbers) displayed.
  Move your pointer to any one of the 24 places below the Block-bar B1-->B8
  and click with the right mouse button. The FUNDAMENTAL of the chord will
  be displayed instead of the number, indicating that that place in the
  current block is occupied by your selected chord. Now, move your pointer
  to another number and click your right mouse button again: that same old
  chord will now occupy the second place you selected with your pointer.
  Go on and get some more (DIFFERENT) chords stored in a block in the same
  way, whenever you've made a sequence (without an empty place in between)
  click the left mouse button on the PLAY BLOCK gadget. Your first chord
  will be played as long as you keep the left mouse button depressed. Now
  click left once more: the next buffered chord will be played etc. etc.
  Once you've finished playing your block, click with the left mouse
  button on any block in the Block-bar which is not printed in red, to make
  that selected block the current one. You'll see another empty 24 places
  to fill in with another chord-sequence, so proceed and play a chord from
  the chord-matrix and store it in the first place: 01. Then play another
  chord and store that one in place 02. Now click left on the (no longer
  empty) first place: you'll hear the stored chord again and you'll see
  the information corresponding to this very chord displayed... Now move
  your pointer to the third place in your current block and click your
  right mouse button... The result will be that the first chord is now
  COPIED to the third place and in fact it can be copied to any place...
  If in the meanwhile you would have selected another scale (SCALECTOR)
  and you copy a buffered chord in a different scale by clicking on its
  fundamental, you'll find the scale-information copied too. This enables
  the mixing of different scales in a Block-sequence and it gives you as
  much creative freedom as possible at the moment (9 scales available).
  You will always OVERWRITE any occupied place in a block, when you want
  to store another chord in that peticular place. If it's your wish to get
  rid of any occupied place and delete its contents: move your pointer to
  that place and click with BOTH mouse buttons at the same time... If you
  decide to work on another block: simply select that block in the bar by
  clicking on it with your left mouse button and you will find that that
  block didn't change a bit. This enables a fast switching between the
  8 different Block-buffers in order to put NO LIMITS to your creativity.
  You will have noticed by now that any chord being displayed in that
  information panel at the bottom left of the screen can be copied into a
  specific place of the current (or any other) Block-buffer, and that
  there are two ways to get a specific chord displayed: the first will be
  to click on the corresponding location in the chord-matrix and the
  second is even much more convenient, once you already selected a chord:
  click your left mouse button on the fundamental displayed in the Block-
  buffer. Clicking your left mouse button on PLAY BLOCK will always play
  your sequenced chords one by one in the indicated order, clicking your
  right mouse button on PLAY BLOCK however will change the reading of the
  gadget to STEP BLOCK. This means that the sequenced chords are played
  in the same indicated order, however by pressing the [ESC]-KEY on the
  keyboard of your computer, you will force the playroutine to jump to
  any next chord in the defined order. It will take some LITTLE bit of
  practice to synchronize your [Esc]-key-presses and left mouse-clicks,
  but once you mastered this timing-problem, the STEP-function may turn
  out to be very useful indeed... Clicking on your current played block on
  the Block-bar will reset the play/step-routine. At the far right of the
  screen on the control panel you'll notice some other useful gadgets,
  such as the INFO gadget (click left on it and you'll know who's fully
  responsible for this very code, click left again to restore the screen)
  and the gadget labeled ? (click left on it and you'll be adviced to read
  this docfile first, click left again and quit the program to print this
  docfile to paper...). The gadget right below the previous ? will perform
  the MIDI-test by a simple click of your left mouse button. Clicking on
  that tiny gadget below the MIDI-test-button will enable you to load some
  other waveform to be used by your audio-channels, read the info given.
  The next gadget of any interest is the one labeled RND>, clicking your
  left mouse button on it will cause the code to play randomly choosen
  chords in the current scale with or without any set delay. However, it
  must be stated that those randomly chord-sequences sound much better
  when the delay is set to 20 or so... Clicking right on RND> will play
  the randomly chosen chords not in argeggio mode (when some delay is set)
  but more in legato. This will only function whenever the MIDI output is
  selected, the audio output will not be affected by any clicking right.
  You'll have to find that out for yourself, but another useful tip might
  be that you can very easily EXPAND these arpeggio's any time by clicking
  left on another gadget, labeled 4 VC: this allows at least 8 notes to
  be arpeggio'd each chord. Click left on the same gadget again to restore
  the default setting: 4 VC. At this point you might be interested in the
  way to STOP this randomly playing: simply KEEP the left or right mouse
  button depressed until the playing stops... (this may take a while,
  especially when a long delay is set and all 8 voices are active...!!)
  Clicking left on >PRT will have no effect on the BM screen, it performs
  a print out of your Seqfile (we will come to the SM screen in just a
  little while from now). Whenever you click left on the gadget labeled
  MODE its display will change to >>>>, indicating that a faster mode is
  active. In this >>>>-mode there will be no information about the played
  chords or blocks at all, its purpose being to improve any concentration.
  In this >>>>-mode you will, consequently, NOT be able to do any editting
  to your sequenced-chords-blocks B1 to B8. The gadgets SHOW/HIDE KEYS and
  SCALECTOR will also be disabled when in this mode. Clicking left on >>>>
  again will restore the default setting (fully informative). The gadget
  below the MODE-gadget just toggles between 4 voices (notes) or 8 voices
  played each chord (arpeggio'd or not), just click the left mouse button
  on it. We have already met this feature a few phrases ago... This takes
  us to the last gadget worth noting: QUIT. This gadget can only perform
  its duty when in the BM screen, and by clicking the left mouse button, a
  sort of requester will appear in which you can actually quit the program
  by clicking your right mouse button, clicking left will restore the
  screen as it was and it will be like NOTHING had happened at all...

  This completes our journey through the Block Mode screen and take your
  time to get really acquainted with all functions, before you start any
  exploration of the Sequencer Mode screen, which will be the next topic
  of this (still relatively short) tutorial...

  Whenever you feel like it, click with your left mouse button on the
  SEQUENCER-gadget and presto...!!

  The screen facing you is the Sequencer Mode screen (SM screen) which
  looks very similar to the BM screen. Its main function is to allow you
  to chain your pre-fabbed chord-sequence-blocks in any peticular order.
  This is simply done by clicking left on the B1 to B8 gadgets to select
  the Block-buffer to be placed in the sequence. If you move your pointer
  to the first place (01) and click left again the previously selected
  Block-buffer will be played on that place in the sequence as a whole.
  The playing of the sequence of Block-buffers will stop whenever an empty
  place is encountered, so chain your Block-buffers one after the other
  without any empty place (if you want the created sequence to be played
  all the way...). You can delete the contents of a place in the sequence
  by clicking the right mouse button whenever your pointer is on that
  peticular place. You'll find most functions of the BM screen copied into
  this SM screen: setting the DELAY, toggling between MODE and >>>>,
  number of VOICES used, toggling between Amiga out and MIDI out, TUNING,
  PLAY- or STEP-function, even clicking left or right on the chord-matrix
  will produce chords (however there will be no information given) and you
  might also want to test your MIDI connections using the MIDI-test-gadget.
  However the RND>-, INFO-, ?- and QUIT gadgets are disabled whenever in
  the SM screen, and another search mode is available by clicking right on
  the keyboard on screen and subsequently clicking on the chord-matrix.
  New options in the SM-screen are formed by the three gadgets at the
  bottom right of the screen: LOAD FILE, SAVE FILE, Seqfile 0. The last
  mentioned gadget allows you to choose any Seqfile with a number between
  0 (default Seqbuffer) and 9. By clicking the left mouse button whenever
  the pointer is on that gadget the Seqfilenumber will be increased by 1,
  by clicking right it will be decreased by 1. By clicking left on the LOAD
  FILE gadget the current Seqfile will be loaded from disk into memory and
  once the loading is completed you will be returned to the BM screen. Now
  clicking left on the SEQUENCER gadget again will result in an updated
  SM screen. Any Seqfile can only be loaded if it exists, if not, you will
  be returned to the BM screen immediately. By clicking right on the SAVE
  FILE gadget the current sequence will be saved to disk with the name as
  indicated in the Seqfile-gadget. However any existing Seqfile of the SAME
  number will be completely OVERWRITTEN, so be careful with this option...
  All LOAD/SAVE functions require a Seqfilenumber not equal to zero. This
  means: you can not LOAD or SAVE Seqfile 0 (default Seqbuffer). To serve
  as an example and to demonstrate the LOAD FILE option there's a simple
  Seqfile included, it's called: Seqfile 1. Try loading it now... And by
  clicking your right mouse button while the pointer is on the >PRT gadget,
  the contents of the current Seqfile will be send to the printer...
  You can exit the SM screen by clicking left on the EXIT gadget, clicking
  right on this gadget will CLEAR all buffers in memory (including all the
  previously set settings...!!!) and subsequently you will be returned
  to the old BM screen again, like any loading or saving a Seqfile does...
  In both screens (BM- as well as SM-screen) the current Seqfilenumber is
  displayed in a small blue gadget right below that tiny unlabelled button
  on the control panel at the right of all screens. There's one more thing
  you should know: whenever you are PLAY-ing or STEP-ping through your
  Seqfile and you feel like stopping in the middle of your composition,
  you can abort the PLAY- or STEP-routine by clicking your right mouse
  button. This will free your pointer again to change some setting or so...
  Finally, you may switch to auto mode by clicking left or right on the
  tiny unlabeled gadget below the MIDI-test-gadget. Having done so, try
  clicking left on PLAY or STEP to hear your Seqfile looping...

  This is the END of this tutorial... This means that ALL features have
  been explained, so click, play, toggle, compose, record etc. as much as
  you like. In case there are still any questions about the operation of
  midichords, I'll be glad to answer them. Click on the INFO gadget of the
  BM screen and you'll know how to reach me... With a little bit of your
  ENCOURAGEMENT I will be developing new features and expanding old ones
  in the near future...
                                                              Theo Brugman.



  PS.1  Whenever you run out of your EMPTY Seqfiles and you don't want to
        overwrite an existing Seqfile, you can simply rename all Seqfiles
        in your directory by using the CLI. Like so:
        [1] > cd <full path to your midichords-directory or root> (return)
        [1] > rename "Seqfile 1" as Seqfile1 (or any other name)
        [1] > rename "Seqfile 2" as Seqfile2 (or any other name)
        [1] > etc. etc.
        After having done this, midichords will no longer recognize your
        precious older Seqfiles and you provided yourself with a complete
        new (unused) Seqfiles to record again...

  PS.2  Since the program (and its related files alltogether) needs about
        250k you're adviced to copy some fully functional (but stripped)
        Workbench1.3 disk and copy all relevant files directly to the root
        of that disk: this will give you lots of working space to handle
        your Seqfiles (renamed or not!) when you stripped your WB disk of
        all programs which aren't needed at the time (like Notepad etc.).
        However if you're lucky enough to own a hard disk, simply copy all
        relevant files to some directory of your hard disk, make that
        directory the current one and everything (like the loading of the
        program itself) will run even faster...

  PS.3  Clicking left on the long blue bar in the SCALECTOR mode will do a
        trick I learned to appreciate, using old-fashioned synthesizers...
        Whenever you play some chord this very same chord will also be
        played a quint higher. For instance: when you click on C min, you
        will hear C min and G min as well... This makes your chords sound
        more massive, however not each chord is suitable for superimposing
        so take care not to make a mess of it. On the right control-panel
        you will note that the display for the selected number of voices
        has changed to: ****, whenever this effect is switched on. The
        only way to switch this effect off again is clicking left on the
        bar in SCALECTOR mode once more. As long as the display is ****
        the number of voices used can not be adjusted by clicking on the
        gadget itself, so if you decide not to use it: go back to the
        SCALECTOR, click left on the long bar and you'll be returned to
        the BM screen again with 4 active voices. Now, if you want to use
        the 8-voice extension again, click left on the appropriate gadget.

  PS.4  Note that you may use the notes played on the tuning-bar in the
        same way as real chords. This enables the buffering of your melody,
        played over three octaves, as if it was a chord-sequence...



  I hope you'll enjoy the program as much as I did creating it, buy... TB.



