home *** CD-ROM | disk | FTP | other *** search
/ Groovy Bytes: Behind the Moon / groovybytes.iso / GROOVY / SND_TOOL / WM10.ZIP / DOC.DAT / midicat.txt < prev    next >
Encoding:
Text File  |  1995-08-30  |  14.9 KB  |  343 lines

  1.              MidiCat v1.0 Copyright 1994 Ron Dippold - Quick Docs
  2.                              All Rights Reserved
  3.  
  4.  INFO BLURB
  5.  
  6.  MidiCat looks through your MIDI files and summarizes the important
  7.  information in a one-line-per-file mode for cataloging or a more verbose
  8.  informational mode. It also tracks General MIDI Instrument and Drum usage
  9.  within the file for analysis.
  10.  
  11.  PC only, runs under DOS. This is 100% free software. The only requirement
  12.  is that you must distribute the executable only along with this
  13.  documentation.
  14.  
  15.  If you're going to distribute this as part of a package or like/use the
  16.  program, please let me know at rdippold@qualcomm.com. I'm not going to ask
  17.  for money, I'd just like to know. If I think there's enough interest, I'll
  18.  update this to handle Cakewalk .WRK files and make some other improvements.
  19.  
  20.  
  21.  I. INTRODUCTION
  22.  
  23.  The entire purpose of this program is to look at a MIDI file and give you a
  24.  quick "dump" of the important contents. I looked all over the Internet for 
  25.  such a program for the purposes of managing my collection, and didn't find 
  26.  one, so, being a programmer, I grabbed the MIDI spec and wrote one.
  27.  
  28.  MidiCat Operates in two modes - single line and informational modes. By
  29.  default, single line mode is used: each MIDI file processed is reduced to a
  30.  single line of information. If you specify additional data to be shown,
  31.  then the single line of info is still shown, but the additional data
  32.  follows. Typically, you might use the single line mode to produce a
  33.  catalog of a whole directory of MIDI files, and the informational modes
  34.  when you're looking at an individual file, for instance prior to playing
  35.  it.
  36.  
  37.  Once you've got your list of files, then you can use a good text editor
  38.  like QEdit or Sprint to massage your "database."
  39.  
  40.  Note: MidiCat doesn't recognize Cakewalk WRK files, but I'm working on
  41.  getting the specs...
  42.  
  43.  If you have more information or suggestions, feel free to email them to
  44.  rdippold@qualcomm.com (Internet).
  45.  
  46.  
  47.  II. SINGLE LINE MODE
  48.  
  49.  Single line usage is easy:
  50.  
  51.              midicat <filename> [<filename> <filename> ...]
  52.  
  53.  <filename> can be the name of a MIDI file, or can include wildcards.  You
  54.  can specify multiple filenames with wildcards, so you could do
  55.  
  56.              midicat my.mid c:\midi\*.mid d:\mididata\*.mmf
  57.  
  58.  midicat doesn't assume anything about extensions - no ".mid" is implied.
  59.  
  60.  You'll get something like this:
  61.  
  62.  Filename                     Size F #T  Time Midi Name
  63.  ----------------------------------------------------------------------------
  64.  ACKER-GS MID               42,355 1 22  4:43 
  65.  ADAGIO   MID               17,180 1 10  3:47 WinJammer Demo
  66.  ADAMSFAM MID                2,141 1  6  0:52 
  67.  ADDCTDGS MID               42,315 1 21  3:51 
  68.  AGENTMAN MID               42,874 1 33  3:23 
  69.  ALLATRCA MID               17,563 1  5  4:27 Alla Turca - Wolfgang A Mozart
  70.  ALMONDS  MID               49,889 0  1  1:56 
  71.  ALNITLNG MID               28,160 -  0  1:56 ** unknown type
  72.  ANCHOR   MID                6,591 0  1  1:36 Anchors Aweigh
  73.  ...
  74.  
  75.  Filename:       The actual name of the file on disk
  76.  Blank Space:    For your use...
  77.  Size:           Size of file in bytes
  78.  F:              Midi Format 0, 1, or 2
  79.                  0 = single track
  80.                  1 = multiple instruments on multiple tracks
  81.                  2 = multiple songs on multiple tracks
  82.                  W = Cakewalk WRK file (in future)
  83.                  - = I can't figure it out
  84.  #T:             Number of tracks in file
  85.  Time:           Estimate of length in minutes and seconds
  86.  Midi Name:      Name of composition
  87.  
  88.  The Midi Name is filled in less often than you might think... there's no
  89.  standard "composition name" metaevent except for Sequence Name of Track 0,
  90.  but many people don't use this, and just stick the composition name in as
  91.  an instrument.  Since others just stick general commentary in as
  92.  instruments, I couldn't come up with a reasonable rule for extracting the
  93.  name from the instruments. Sorry...
  94.  
  95.  If there are any errors interpreting the file, you'll see a "** error" type
  96.  comment where the Midi Name is. In this case, ALNITLNG.MID is "** unknown
  97.  type". A quick look at ALNITLNG.MID reveals that it's a compressed file
  98.  masquerading as a Midi file. Shame! Another one you might see is
  99.  "** unknown MIDI status 123456:78". The first number is the hexidecimal
  100.  position in the file where the unknown status was found, the second number
  101.  is the status in hex. I've run several hundred MIDI files through, but
  102.  you might have some that use statuses not in the MIDI 1.0 standard.
  103.  MidiCat will try to find the next known status and keep going.
  104.  
  105.  
  106.  III. INFORMATIONAL MODES
  107.  
  108.  MidiCat keeps track of some other informational items as it cruises through
  109.  the MIDI program.  You can choose which of this information you want to
  110.  display, with information overload being your only real concern.  Just add
  111.  some parameters to the command line:
  112.  
  113.          midicat -1234567?+* -t -di -h -v <filename> [<filename> ...]
  114.  
  115.  The options can be stacked together in one parameter if you want, like
  116.  "-+tdiv", they're just grouped by function here for convenience.
  117.  
  118.    -1234567?: Print text fields found
  119.        1 = Text Event (Text)      2 = Copyright (Copy)
  120.        3 = Seq/Track Name (Name)  4 = Instrument Name (Inst)
  121.        5 = Lyric (Lyri)           6 = Marker (Mark)
  122.        7 = Cue Point (Cue )       ? = Other unknown text (????)
  123.    -+: Equivalent to -12346
  124.    -*: Equivalent to -1234567?
  125.  
  126.  The MIDI standard defines several Meta Events, and reserves 1-15 for
  127.  different text events. 8 and up are undefined, but may be defined in the
  128.  future, or used by your MIDI program, so you can use ? to see all the
  129.  unrecognized text types.
  130.  
  131.  Since I've found that people use fields 1, 2, 3, 4, and 6 for instruments
  132.  and/or comments without rhyme or reason, they're probably the most
  133.  interesting from an overview perspective so the "+" option is the same as
  134.  "12346". MidiCat will print any text events one per line.
  135.  
  136.    -t: Print time from start of track for text events
  137.  
  138.  MidiCat tries to keep track of the time as it goes through the midi file -
  139.  when it prints one of the text fields above, it'll add the time to it if
  140.  you use this option.
  141.  
  142.    -h: Don't print MIDI info header
  143.  
  144.  This turns off the "Filename..." and "-----" printing, in case you don't
  145.  need another set of headers.
  146.  
  147.    -v: Only print info for valid MIDI files
  148.  
  149.  If you use this, MidiCat won't print anything for files that it can't
  150.  recognize as MIDI files.
  151.  
  152.    -d: Keep track of drums. Only valid for General MIDI.
  153.    -i: Keep track of instruments. Only valid for General MIDI.
  154.  
  155.  See INSTUMENT ANALYSIS below.
  156.  
  157.  If I do a "midicat -*t action4.mid" I get the following:
  158.  
  159.  Filename                     Size F #T  Time Midi Name
  160.  ----------------------------------------------------------------------------
  161.  ACTION4  MID               36,635 1 15  1:26 
  162.     0:00  0 Copy: Copyright (C) 1992 by Voyetra Technologies
  163.     0:00  1 Name: Copyright (C) 1992  
  164.     0:00  2 Name: Voyetra Technologies
  165.     0:00  3 Name: B Melody            
  166.     0:00  4 Name: B Bass              
  167.     0:00  5 Name: B Melody 2          
  168.     0:00  6 Name: B Drums             
  169.     0:00  7 Name: X Rhythm Synth      
  170.     0:00  8 Name: X Bass 1            
  171.     0:00  9 Name: X Bass 2            
  172.     0:00 10 Name: X Melody 1          
  173.     0:00 11 Name: X Melody 2          
  174.     0:00 12 Name: X Hi-Hat            
  175.     0:00 13 Name: X Bass Drum         
  176.     0:00 14 Name: X Snare Drum
  177.  
  178.  The numbers on the left are the times, the next numbers are the track
  179.  numbers. You can see there are 15 tracks, numbered 0 through 14, though
  180.  only 3-14 appear to have instrument tracks. Next is a 4-character event
  181.  code:
  182.  
  183.    Text: Text Event              Copy: Copyright
  184.    Name: Seq/Track Name          Inst: Instrument Name
  185.    Lyri: Lyric                   Mark: Marker
  186.    Cue : Cue Point               ????: Other marker
  187.  
  188.  Following that is the actual text contained in the file. They used the
  189.  Copyright event, but also included it as 2 sequence names. They didn't
  190.  bother to give it a name. All the sequence names come right at the starts
  191.  of the tracks. This is a fairly typical display, although it's more tracks
  192.  than normal.
  193.  
  194.  
  195.  IV. INSTRUMENT ANALYSIS
  196.  
  197.  MidiCat has two instrument analysis modes. -i watches all the MIDI Program
  198.  Change messages as they go by and reports them. Usually this will be done
  199.  only once or maybe twice a track. -d watches all the MIDI Note On messages
  200.  for a Note being sent to channel 10, the percussion channel.
  201.  
  202.  MidiCat assumes that the MIDI file is a General MIDI file. General MIDI
  203.  defines a specific set of instruments and drums, so that if you do a
  204.  program change to 110, you can guarantee that you're getting a bagpipe
  205.  sound. It also specifies that channel 10 is percussion, and which
  206.  instrument goes with each note. 52 (Eb3), for instance, is a Ride Cymbal.
  207.  
  208.  If the MIDI file wasn't written for General MIDI, you can't guarantee that
  209.  the instrument getting played is the instrument the composer intended, so
  210.  things sound weird. For example, the Roland MT-32 has a different set
  211.  of patches, so a file composed for that won't sound right on a General MIDI
  212.  instrument. There's nothing in a MIDI file that tells you whether it's
  213.  General MIDI or not.
  214.  
  215.  MidiCat can help here. It can show you all the program changes. If the
  216.  instrument names the composer used match with the instruments you're
  217.  seeing, it's probably a General MIDI file. If not, you'll have to reassign
  218.  the instruments for your General MIDI device. Here's an example:
  219.  
  220.  D:\MIDI> midicat -*ti dasboot.mid
  221.  
  222.  Filename                     Size F #T  Time Midi Name
  223.  ----------------------------------------------------------------------------
  224.  DASBOOT  MID               50,191 1  9 11:11 
  225.     0:00  1 Text: Strings
  226.     0:01  1 Midi    Channel  1 set String Ensemble 1
  227.     0:00  2 Text: OrchesHit
  228.     0:01  2 Midi    Channel  2 set Orchestra Hit
  229.     0:00  3 Text: Brass
  230.     0:01  3 Midi    Channel  3 set SynthBrass 1
  231.     0:00  4 Text: Bimmel
  232.     0:01  4 Midi    Channel  4 set Glockenspiel
  233.     0:00  5 Text: Echolot
  234.     0:01  5 Midi    Channel  5 set FX 3 (crystal)
  235.     0:00  6 Text: Bass2
  236.     0:01  6 Midi    Channel  6 set Synth Bass 2
  237.     0:00  7 Text: Bass
  238.     0:01  7 Midi    Channel  7 set Synth Bass 1
  239.     0:00  8 Text: Drums
  240.     0:01  8 Midi    Channel 10 set Standard Drum Set
  241.  
  242.  This looks pretty good...  the "Midi" lines tell you the which MIDI channel
  243.  was changed to what instrument. Comparing them with the "Text" events the
  244.  composer entered, you can see we're pretty well matched. This MIDI file
  245.  should play well on a General MIDI device.
  246.  
  247.  Here's another one (I'm deleting some unnecessary lines for brevity):
  248.  
  249.  D:\MIDI> midicat -*ti danube.mid
  250.  
  251.  Filename                     Size F #T  Time Midi Name
  252.  ----------------------------------------------------------------------------
  253.  DANUBE   MID               19,041 1 34  2:17 
  254.     0:00  2 Name: for Voyetra's       
  255.     0:00  3 Name: Sequencer Plus ver.4
  256.     0:00  5 Name: 1st Violin          
  257.     0:00  5 Midi    Channel  1 set Music Box
  258.     0:00  6 Name: Bass                
  259.     0:00  6 Midi    Channel  2 set Lead 2 (sawtooth)
  260.     0:00  7 Name: French Horn         
  261.     0:00  7 Midi    Channel  3 set Percussive Organ
  262.     0:00  8 Name: 1st Piano           
  263.     0:00  8 Midi    Channel  4 set FX 8 (sci-fi)
  264.     0:00  9 Name: 2nd Violin          
  265.     0:00  9 Midi    Channel  5 set Baritone Sax
  266.     0:00 10 Name: Cello               
  267.     0:00 10 Midi    Channel  6 set Vibraphone
  268.     0:00 11 Name: 2nd Cello           
  269.     0:00 11 Midi    Channel  7 set Vibraphone
  270.     0:00 12 Name: Flute               
  271.     0:00 12 Midi    Channel  8 set Reed Organ
  272.     0:00 13 Name: Trumpet             
  273.     0:00 13 Midi    Channel  9 set Dulcimer
  274.     0:00 14 Name: 3rd Violin          
  275.     0:00 14 Midi    Channel 10 set Unknown Drum Set
  276.  
  277.  Obviously, this isn't going to play very well...  A Percussive Organ is
  278.  nothing like a French Horn. This one will need hand conversion, unless you
  279.  have a "Voyetra to General MIDI" converter of some sort.
  280.  
  281.  Sometimes the composer doesn't put ANY useful text information in the MIDI
  282.  file. In this case, MidiCat can tell you what instruments are on what tracks.
  283.  
  284.  
  285.  V. DRUM ANALYSIS
  286.  
  287.  MidiCat also watches for General MIDI drum events. Since each note is a
  288.  different instrument, it wouldn't be reasonable to list every one as it's
  289.  found in the file. Instead, it keeps track of each event as it happens,
  290.  then lists them all after everything else.
  291.  
  292.  It _does_ keep track of drum channel program changes.  There is really no
  293.  standard for this, so I'm using the drum set table from my Roland SC-7.
  294.  
  295.          Program Change #    UsedCode    Drum Set
  296.          ----------------------------------------------------
  297.          0x00 - 0x0F             S       Standard Drum Set
  298.          0x10 - 0x17             P       Power Drum Set
  299.          0x18, 0x1A-0x27         E       Electric Drum Set
  300.          0x19                    T       TR-808 Drum Set
  301.          0x28-0x2F               B       Brush Percussion Set
  302.          0x30-0x37               O       Orchestra Percussion Set
  303.          other                   U       Unknown
  304.  
  305.  You'll see these as they occur in the tracks, like this:
  306.  
  307.     0:00  8 Text: Drums
  308.     0:01  8 Midi    Channel 10 set Standard Drum Set
  309.  
  310.  Don't panic if you see Unknown Drum Set, your MIDI device/program will
  311.  probably just use the Standard set anyway.
  312.  
  313.  Once all the other information is listed, the used drums will be shown:
  314.  
  315.  D:\MIDI> midicat -*d eleanor2.mid
  316.  
  317.  Filename                     Size F #T  Time Midi Name
  318.  ----------------------------------------------------------------------------
  319.  ELEANOR2 MID               65,725 1 10  6:15 
  320.     1 Name: bass | eleanor rigby
  321.     2 Name: bass | eleanor rigby
  322.     3 Name: brite celeste | lead
  323.     4 Name: brite celeste | lead
  324.     5 Name: chords
  325.     6 Name: chords
  326.     7 Name: drums | retrograde
  327.     8 Name: drums
  328.     9 Name: POP1 rhythm
  329.   Drums Used (General Midi):
  330.    S35:Ac. Bass [Kick 2]    S36:Bass Drum 1 [Kick 1] S38:Ac. Snare [Snare 1]
  331.    S39:Hand Clap            S42:Closed Hi-Hat        S43:Hi Floor Tom [Lo 1]
  332.    S46:Open Hi-Hat          S47:Lo-Mid Tom [Mid 1]   S48:Hi-Mid Tom [Hi 2]
  333.    S49:Crash Cymbal 1       S51:Ride Cymbal 1        S69:Cabasa
  334.  
  335.  Here we can see that all the drums used are from the standard set, because
  336.  of the "S" prefix. The [bracket] names are the Roland versions of the
  337.  names. Since there are so many of them out there, I decided to show both.
  338.  Drum "note" 47, for instance, is called Lo-Mid Tom by some General MIDI
  339.  docs, but Mid Tom 1 by the Roland SC-7 General MIDI device. Oh well.
  340.  
  341.  This feature isn't as generally useful as the Instrument Analysis, but can
  342.  be interesting.
  343.