home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: Multimed / Multimed.zip / x2midi.zip / x2midi / x2midi.doc next >
Text File  |  1995-08-24  |  13KB  |  242 lines

  1.  X2Midi
  2.  
  3.  Please read this document in entirety.  I took the time to make it explicit, clear, and very useful.  It took me
  4.  longer to write it than it will ever take you to read it.  Therefore, you owe it to both of us to read it.  OK?
  5.  
  6.  X2Midi is an OS/2 2.X command line application that extracts System Exclusive data from a MIDIEX data file (in
  7.  Ascii or raw, binary format) and resaves that data in a standard MIDI file.  Such a MIDI file can then be loaded
  8.  into, and "played back" by, any sequencer that supports System Exclusive data and the MIDI file format.
  9.  
  10.  Some librarian and patch editing utilities (and even some sequencers) save System Exclusive data in a raw,
  11.  binary dump, or Ascii (ie, a text file that you can load into a text editor and visually see the System Exclusive
  12.  data values such as F0 41 39 etc).  This is not really a standard file format for music use.  The MIDI file format
  13.  is the de facto standard for storing MIDI data, including System Exclusive data.  X2Midi makes it possible to
  14.  convert data files made by such utilities into a more standard format to be used with a greater number of
  15.  programs.
  16.  
  17.  This is version 1.0.
  18.  
  19.  
  20. COPYRIGHT
  21.  
  22.  This OS/2 Online Book and the related file, X2MIDI.EXE are all copyright 1995 by Jeff Glatt.  These files are
  23.  freely redistributable, and may be used by and distributed along with any software, be it commercial or
  24.  otherwise, provided that these files are not internally modified, nor specifically sold as a complete product by
  25.  themselves.  The only price that you have to pay is the one that you're already paying by spending all of your
  26.  time in front of a computer instead of developing healthier outlets.
  27.  
  28.  NOT SO STANDARD DISCLAIMER:
  29.  
  30.  These programs are provided "as is" without warranty of any kind either expressed or implied or tatooed in a
  31.  place that only a few people have ever seen, including but not limited to the implied warranties of
  32.  merchantability, fitness for a particular purpose, and the dubious assumption that the software has been created
  33.  by a sane individual who would never do anything that may hurt you. The entire risk as to the results and
  34.  performance of the programs is assumed by you or someone who looks exactly like you.  Jeff Glatt does not
  35.  guarantee that the functions in these programs will meet your requirements, especially if your requirements
  36.  involve lots of latex and some docile, domesticated animal.  Nor does Jeff Glatt warranty the programs to be
  37.  uninterruptable or error-free, although mercifully free of "General Protection Faults".  If you use said programs,
  38.  you can not say anything nasty about the author, even if the programs inadvertently cause the erasure of your
  39.  collection of X-rated GIFs of a conservative, overweight and overrated TV "personality" plooking himself vigorously
  40.  with his royalty checks from some rancid paperback.  Jeff Glatt is not responsible for any damages as a result
  41.  of anything that he has done, or hasn't done, or was supposed to do but never got around to it, and furthermore,
  42.  he doesn't even care so leave him alone, ratface.  You may have more or less protections in certain states of
  43.  the union, depending upon how far your local politician is willing to bend over for some bribe from a business
  44.  lobbyist.  Just remember that Jeff Glatt has no money, so don't bother suing him as a result of any damages
  45.  caused by this OS/2 program.  Tell your greasy lawyer to go after IBM, and make sure that you pick 12 really
  46.  stupid pinheads for the jury.    If swallowed, induce vomiting immediately by contemplating the asthetics of
  47.  Microsoft Windows.
  48.  
  49.  OS/2 is a trademark of International Business Machines Corporation.
  50.  
  51.  Windows is a trademark of Microsoft Incorporated, and furthermore, Bill Gates is to blame for it.
  52.  
  53.  If you have suggestions, comments, criticisms, and anything else other than dollar bills, then send them to
  54.  someone else because you got it for free, and you know what you get for nothing?  But, if you do need to
  55.  contact the author, then either phone some of the more prominent psychiatrict clinics in central New York state,
  56.  or try this:
  57.  
  58.  Jeff Glatt
  59.  6 Sycamore Drive East
  60.  New Hartford, NY 13413
  61.  (315) 735-5350
  62.  
  63.  
  64. SYNTAX
  65.  
  66.  X2Midi runs in an OS/2 Command Prompt Window.    The syntax is as follows:
  67.  
  68.  X2MIDI [/A /Txxx /Pxxx /Mxxx] MIDIEX_filename [MIDI_filename]
  69.  
  70.  The items in brackets are optional.  Any, all, or none of these may be specified or omitted.  Options are
  71.  preceded by a / character.  These can be placed anywhere (ie, after the source and destination filenames,
  72.  inbetween the filenames, etc).  The destination filename (ie, MIDI_filename) is optional, but if specified, it must
  73.  be somewhere after the source filename (ie, MIDIEX_filename).
  74.  
  75.  The arguments are:
  76.  
  77.  MIDIEX_filename      The name of the original MIDIEX file (that X2Midi is going to read).    Running X2Midi
  78.               without supplying any filename results in X2Midi simply printing out its help template.
  79.  
  80.               Note:  If you need to convert MIDIEX files that contain MIDI messages besides System
  81.                  Exclusive, then you need to use another conversion utility.  X2Midi extracts only
  82.                  System Exclusive messages.
  83.  
  84.  
  85.  MIDI_filename          The name of the new MIDI file that you want X2Midi to create.  If you don't supply this,
  86.               then X2Midi overwrites the original file.
  87.  
  88.  /A              The original MIDIEX file is ascii text (ie, not a raw binary).  When you look at an ascii text
  89.               file in a text editor, you should see the numerals 0 to 9 and letters A to F used to list the
  90.               data values.    For example, you'll typically see F0 as the first data value in the file.  If the
  91.               original file is ascii, then you need to inform X2Midi of this in order for it to create a
  92.               proper MIDI file conversion.    On the other hand, if you look at a raw binary file in a text
  93.               editor, you'll typically see lots of weird, graphical characters that seem to make no sense
  94.               at all to a human.  Unless you tell X2Midi that the original file is ascii (by specifying the /A
  95.               option), then X2Midi assumes that it is raw binary.
  96.  
  97.  /Pxxx              Set the Pulses Per Quarter Note, and xxx is the resolution.  Set this to the same clock
  98.               resolution as the sequencer that will play back the file.  For example, if the sequencer has
  99.               96 ppqn resolution, then specify /P96.  If you don't specify Pulses Per Quarter Note, X2Midi
  100.               assumes 96 ppqn.
  101.  
  102.  /Txxx              Set the Tempo, and xxx is the tempo in Beats Per Minute.  Set this to the same tempo as
  103.               you intend to use upon the sequencer that will play back the file.  For example, if you
  104.               intend to use a tempo of 120 BPM, then specify /T120.  If you don't specify Tempo, X2Midi
  105.               assumes 120 BPM.
  106.  
  107.  /Mxxx              Set the time inbetween System Exclusive messages, and xxx is the time in milliseconds.
  108.               For example, if a certain MIDI unit requires that there be 40 milliseconds inbetween each
  109.               received System Exclusive message, then specify /M40.  This time is added to the amount
  110.               of time that it takes to transmit each System Exclusive message (contained in the original
  111.               file) over MIDI.  If you don't specify a time delay, X2Midi assumes 40 milliseconds, which
  112.               is what Roland non-handshaking transfers usually require.
  113.  
  114.  
  115.  It's important to set Pulses Per Quarter Note and Tempo to the values that you intend to use upon the sequencer
  116.  playing back that MIDI file.  (When the sequencer loads the MIDI file, it should automatically set itself up to that
  117.  specified Tempo, and probably clock resolution as well).  If you subsequently speed up the Tempo or increase the
  118.  clock resolution, the timing inbetween System Exclusive packets will be shortened such that the MIDI unit may no
  119.  longer have the amount of delay inbetween packets that it expects, and the sequencer may send the data too fast
  120.  for the MIDI unit to process, resulting in a bad transmission.
  121.  
  122.  Note:    It doesn't matter if you use lower or upper case on the options (ie, /A or /a).
  123.  
  124.  
  125. ERRORS
  126.  
  127.  Here are the possible error messages that you may see.  Following each message is a description of likely
  128.  causes for that error and possible remedies.
  129.  
  130.  When X2Midi finally terminates, it returns an Error Result (ie, number) to the OS.  A 0 returned value indicates
  131.  that the operation was a success.  Non-zero values are errors.  Note that this is returned in the REXX special
  132.  variable RC when calling X2Midi from a REXX script.
  133.  
  134.  
  135. Can't open source file!
  136.  Synopsis    A MIDIEX file, that you asked X2Midi to convert to MIDI file format, didn't open.
  137.  
  138.  Cause        The filename that you specified is incorrect.
  139.  Cure        Check the filename that you entered.  Did you specify some directory and file that exists?
  140.  
  141.         Note:  X2Midi does not support wildcards.
  142.  
  143.  Cause        Some other program has this filename currently in use, and is preventing X2Midi from reading it.
  144.  Cure        Make that other program close this filename.
  145.  
  146.  Result     Any of the possible errors from DosOpen().
  147.  
  148.  
  149. Can't determine size of source file!
  150.  Synopsis    X2Midi needs to determine the size of the source file in order to read it into memory and perform
  151.         the conversion process.  X2Midi needs OS/2 to be able to return information about the file.
  152.  
  153.  Cause        For some reason, OS/2 didn't give X2Midi the requested information.
  154.  Cure        Shut down other apps, or OS/2 itself, and try X2Midi again.  Some other app may have interferred
  155.         with the proper reading of the file.
  156.  
  157.  Result     Any of the possible errors from DosQueryFileInfo().
  158.  
  159.  
  160. Can't allocate memory to read source file!
  161.  Synopsis    X2Midi needs to allocate memory in order to read in the entire file and perform the conversion
  162.         process.  X2Midi needs OS/2 to fulfill its request for that memory block.
  163.  
  164.  Cause        For some reason, OS/2 didn't fulfill X2Midi's memory request.
  165.  Cure        Check that you're not trying to convert a file that is larger than the sum total of your RAM and swap
  166.         file size.  This could be the case if the MIDIEX file contains a waveform dump of an extremely large
  167.         waveform.
  168.  
  169.         If it's a problem that other running apps have used up too much RAM and swap space to load the
  170.         MIDIEX file, then shut down other apps, or OS/2 itself, and try X2Midi again.
  171.  
  172.  Result     Any of the possible errors from DosAllocMem().
  173.  
  174.  
  175. Bad read of source file!
  176.  Synopsis    While loading a MIDIEX file, that you asked X2Midi to convert to MIDI file format, an error was
  177.         encountered.
  178.  
  179.  Cause        The file is corrupt.
  180.  Cure        Use a backup copy of the file.
  181.  
  182.  Result     Any of the possible errors from DosRead().
  183.  
  184.  
  185. Bad sysex packet! This is not a MIDIEX file, or is corrupt.
  186.  Synopsis    While converting a MIDIEX file, X2Midi discovered an inconsistancy with what it would expect to find
  187.         in such a MIDIEX file, indicating that the file is damaged, or not really MIDIEX format.
  188.  
  189.  Cause        The file is corrupt.
  190.  Cure        Use a backup copy of the file.
  191.  
  192.  Cause        The file is ascii text, but you didn't specify the /A option.
  193.  Cure        Redo the conversion, specifying the /A option.
  194.  
  195.  Cause        The file is in some other format other than a MIDIEX ascii or raw binary format.  In other words, it
  196.         appears to contain more than just MIDI data values (ie, possibly file headers or other data).
  197.  Cure        Use another file conversion program to convert this file to MIDI format.
  198.  
  199.  Result     RC = -1
  200.  
  201.  
  202. No System Exclusive packets contained within this file!
  203.  Synopsis    While converting a MIDIEX file, X2Midi encountered no System Exclusive data within the file.
  204.         X2Midi extracts only System Exclusive data, and ignores all other MIDI data.
  205.  
  206.  Cause        Your MIDIEX data file contains no System Exclusive data.  If the file is a text file, you can check
  207.         that it contains System Exclusive data by loading it into a text editor and checking to see if it
  208.         contains data values of F0 followed by F7.
  209.  Cure        There's nothing that X2Midi can do with a MIDIEX file that doesn't contain System Exclusive dumps.
  210.  
  211.  Result     RC = -2
  212.  
  213.  
  214. Can't open destination file!
  215.  Synopsis    The new MIDI file, that you asked X2Midi to create, didn't open.
  216.  
  217.  Cause        The filename that you specified is incorrect.
  218.  Cure        Check the filename that you entered.  Did you specify some directory that doesn't exist?  X2Midi
  219.         only creates files; not new directories.
  220.  
  221.  Cause        Some other program has this filename currently in use, and is preventing X2Midi from writing to it.
  222.  Cure        Make that other program close this filename.
  223.  
  224.  Cause        The file exists, but although you agreed to overwrite it, it has its READONLY bit set, so X2Midi can't
  225.         overwrite it.
  226.  Cure        Use OS/2's ATTRIB command to turn off the READONLY status of this file.
  227.  
  228.  Cause        You chose to save data upon some media that is write-protected.
  229.  Cure        Remove the write-protection.
  230.  
  231.  Result     Any of the possible errors from DosOpen().
  232.  
  233.  
  234. Bad write to destination file!
  235.  Synopsis    In saving a new MIDI file, X2Midi encountered an error writing the data to the file.
  236.  
  237.  Cause        The media is full.
  238.  Cure        Make sure that there is enough room on the media to contain the new MIDI file that X2Midi creates.
  239.         X2Midi doesn't predict required space before converting the data, so use your own judgment.
  240.  
  241.  Result     Any of the possible errors from DosWrite().
  242.