Use this menu to read about...

  • An Introduction to the MidiPlayer - please read this section first!
  • Using the MidiPlayer - don't panic - this is actually dead easy!
  • MPX1and MPX2 files - some introductory notes.
  • Additional Notes - general notes about program limitations etc.
  • MidiPlayer History - brief notes on versions released previously.
  • Possible Enhancements - a few ideas on what may come later.

  • Introduction

    MidiPlayer 1.50 is the Workbench runable form of an Amiga utility for playing Type 0 and Type 1 Midi files out through the serial port. Ready made Midi files are of course available from a great many suppliers nowadays and with CrossDOS now an integral part of the Amiga's system software you'll be able to use the MidiPlayer program to read, play, and convert songs not only from Amiga disks but from Atari ST, Atari Falcon or PC formatted disks as well.

    Although the MidiPlayer started life as just a simple-to-use Midi file player a number of additional facilities have been added in recent years. To start with MidiPlayer can also play MPX2 files as well. More importantly, however, the program can convert Midi files into their equivalent MPX1 and MPX2 formats. And to the best of my knowledge it is the ONLY program available at the moment which will do this!

    Why are the MPX1 and MPX2 formats important? One reason is that they offer an EASY way for anyone with a litle programming experience to add Midi playback facilities to their programs!

    This version of the MidiPlayer program is, incidentally, purely for Release 2 machines (and upwards). It will NOT run on Workbench 1.3 or earlier O/S releases!

    Why was the MidiPlayer written? There's not a lot to say here - I produced the MidiPlayer basically just for my own use because it seemed pretty pointless having fully-fledged sequencers on stage when really all that's needed during a gig is just basic Midi fle playback facility. Quite simply at the time I first started using my Amiga in bands (and we're talking almost ten years ago now) there were no Amiga Midi file players around (or if there were I never found them) - so I sat down at wrote my own.

    Initially all that I needed was to be able to load a Midi file, start it playing, and stop it playing (at ant time)! The program is a little more sophisticated nowadays but I'm afraid that I do not really get much time to add all the things that perhaps ought to be included. To be honest MidiPlayer has just been updated as and when I've had the time (and inclination) to do so.

    It's worth emphasising the fact that MidiPlayer has been used on hundreds of live gigs. Needless to say I wouldn't have done that unless I thought my coding was relatively safe. The coding incidentally (such as it is) is all mine and, as all Midi handling is done within the program itself, no external libraries are needed. Although the program could do with many more facilities I'm quite pleased with what's been achieved in a relatively small amount of code (a little over 32K)!

    The good news is that, since this program was really written for me, rather than you, I do not want (nor would I have the audacity to ask for) any money from anyone who finds the program useful. The bad news I'm afraid is that, not only is there no 'better' version of this program available, but I can't offer to let you 'register' as a user in order to get any updates that may come along!


    How to Use the MidiPlayer

    It's easy. Just connect your synth/sound modules etc., via a Midi interface as per usual and double click on the MidiPlayer icon. Use either the Project Menu's Load Midi File or Load MPX2 options to open the file requester and select a file. When you click on OK the file (if valid) will be loaded and, in the case of Midi files only, the file will be analysed and the various channel numbers and message classes displayed. The purpose of this is just to make it easier for users to set up their equipment when playing files created by other people!

    Once a Midi file is in memory you will also be able to use the Display menu to examine a number of other file characteristics. In particular you'll be able to see if the file contains any Sysex or sequencer specific meta events. Please note, however, that these displays are for Midi files only. When loading MPX2 files you will NOT see details of channels/events and so on.

    The Play File menu is used for playing, or cancelling the playing of, the currently loaded Midi or MPX2 file. All Notes Off messages are sent as soon as a play operation is cancelled so most equipment should therefore turn off any hanging notes very quickly. As a precaution real Note Off messages then also get sent for every note on every channel - this is because some Midi units refuse to recognise All Notes Off commands.

    The Utility menu provides a similar Kill Notes option that can be used at any time. It also allows you to write out a loaded Midi file in both MPX1 and MPX2 format.


    MPX1 Files

    Please note If you are not a programmer you will NOT need to use, nor learn about, MPX1 file conversion!

    The MidiPlayer program is able to translate any currently loaded Midi file into an alternative format called MPX1. The corresponding MPX1 files produced are, incidentally, always larger than the Midi files from which they are derived. Despite the size penalty they do have a big advantage - they are very easy files for a program to read because all of the difficult Midi File event unpacking has already been done. Adding MPX1 file playing capability to a Basic, C or assembler program is extremely simple!

    Because MPX1 files treat each Midi message as a separate event they do not make particularly efficient use of the Amiga's serial device. They are best used in conjunction with programs that are going to play songs through the Amiga's internal sound chips.

    MPX1 files will be recognised whatever you decide to call them but I recommend that you name such files with an .mpx1 filename extension because you'll then be able to easily recognise such files.

    Please note that (time permitting) I will be providing details about the structure and use of MPX1 files in the near future.


    MPX2 Files

    Please note If you are not a programmer you will NOT need to use, nor learn about, MPX2 file conversion!

    The MidiPlayer program can also translate Midi files into MPX2 form. The corresponding MPX2 files produced are, again, always larger than the Midi files from which they are derived. But again, despite the size penalty, they have the advantage that the files are easy for a program to read because all of the difficult Midi File event unpacking has already been done. Adding MPX2 file playing capability to a Basic, C or assembler program is very easy.

    The MPX2 format effectively joins together all Midi events of a particular time into a single block of data. This means that programs using MPX2 files will make more efficient use of the Amiga's serial device. This being so these files are normally only used by programs that are going to output their song data down the Midi lines.

    MPX2 files will be recognised whatever you decide to call them but I recommend that you name such files with an .mpx2 filename extension because you'll then be able to easily recognise such files.

    Please note that (time permitting) I will be providing details about the structure and use of MPX2 files in the near future.


    Additional Notes

    1. All sysex messages are filtered out because I'm not keen on having unknown, and possibly rogue, sysex messages pumping through my Midi gear without warning. If you find this a restiction then tough! I might however put some menu toggles into the program one day to allow such data to be optionally filtered or transmitted.
    2. Files with SMPTE-time are not currently supported.

    Ideas on Possible Enhancements

    1. User selectable tempo adjustment.
    2. Real time Midi channel remapping.
    3. More detailed Meta and Sysex event notification facilities.
    4. Midi file editing facilities.
    5. Copyright event insertion.

    MidiPlayer History

    November 92 [version 1.00]

    After a few months of reading the Midi File standard, and experimenting with various possible coding approaches a preliminary Shell version (v 1.00) was created and released in order that my Midi file parsing ideas could be given some real testing.

    January 94 [version 1.10]

    No unexpected problems had been found to date but I decided to modify the resource allocation method being used (program now uses a stack ADT based procedure). Whilst making these changes a couple of minor changes were made to the code. Firstly, the delta time delay code was placed in line (rather than being called as a function). Secondly, the code around the 1.3 timer device (<2 usecs) bug was removed since I realised that time delays of this small magnitude would never occur in practice. This version was released as MidiPlayer version 1.10.

    January 94 [version 1.20]

    Shortly after version 1.10 was released I decided to spend some time adding an Intuition interface. This program was released as a Workbench runable MidiPlayer version 1.20.

    April 94 [version 1.30]

    Now maintaining both Workbench and Shell usable versions and both can now handle Type 0 and Type 1 Midi files. Also added some experimental Copper list code to brighten up the display of the WB version and some Gadtools gadget code in readiness for possible future enhancements (the gadgets themselves were not seen in this release because the code was disabled in the version 1.3 WB_MidiPlayer release).

    November 94 [version 1.40]

    Version 1.4 has been released and this provides a number of improvements. Firstly, I've modified the Midi file playing routines so that the data is read directly from the queue ADT used to store the extracted Midi messages rather than creating a copy of this information in a temporary ram file (as version 1.3 did). Secondly, I've improved the playback timing (earlier versions have been a little slow). MPX2 file writing and playback routines have been added so it is now possible to read in a Midi file, write it out as an MPX2 file, and play files written in MPX2 format. This facility is included primarily for programmers.

    During execution many routines pass back error codes which indicate the presence or absence of problems such as wrong file types, write errors and so on. The MidiPlayer has always used these values internally but the latest version now displays equivalent text messages for the user.

    June 96 [ version 1.50]

    Have added MPX1 file writing facilities and generally tidied up some existing routines. Have also removed the copper list display shading routines and replaced them with a tile-based background that brightens up the display in a rather more Intuition-friendly way!

    Please note that (time permitting) I will be providing details about the use of MPX1 and MPX2 files in the near future.


    Glossary

    Midi File
    A standard type of Midi sequence file that can be read and written by most sequencers.
    Midi File Player
    A program that can read a Midi file and output the data it contains either down the Midi lines or through a sound card or other internal sound facilities that are available.