ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ MidiMix MIDI-to-XM Converter ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Version 1.10 ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ by Zvika Ben-Haim (a.k.a. Slarti) ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Quick Start ÍÍÍÍÍÍÍÍÍÍÍÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ For people who hate documentation: MidiMix is a program which reads MIDI files and exports, or converts, them into FastTracker XM modules. It's simple to use and pretty self- explanatory. Just run the program MIDIMIX from the MidiMix directory, and follow the instructions. But please read the "Program Status" section below. The program does not include samples for the different instruments, so to get a completely playable XM file you will have to use your own samples. If you do not add samples, the resulting XM file will not generate any sound when played. The rest of the documentation contains an explanation of the MIDI and XM formats, inlcudes a short explanation of how to use the program for compulsive documentation-readers, and describes some advanced topics explaining how to add your own samples to MidiMix. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Program Status ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ MidiMix is shareware. You are encouraged to copy and distribute the shareware version of the program. However, if you use the program for anything but evaluation purposes, you must register it. You can register by cash, check or money order, sent to the address written below, in the section "Contacting the Author". Registering costs $10, and will entitle you to the following benefits: ú You will receive the complete registered version, which can use as many as the full 32 channels supported by the XM format, as opposed to the 8-channel limitation in the shareware version. ú You will receive the newest available version of MidiMix. ú You will be able to obtain online technical support through the Internet. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ The MIDI File Format ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ MIDI stands for Musical Instrument Device Interface. It is a standard originally designed to allow electronic musical instruments to communicate with each other, for instance in order to provide a standardized connection between an organ keyboard and the synthesizer actually generating the sound. The MIDI specification includes commands describing exactly what note is played at each time, and how this information should be passed through cables between the instruments. In PCs, MIDI often refers to what is technically known as a "MIDI file", which is a method of storing MIDI instructions for one or more instruments in a file. All major PC sound cards since AdLib and the original SoundBlaster support some form of MIDI music synthesis. This means that you can take a set of MIDI instructions and send it to the sound card, and the sound card will convert this to actual music that caheard in the computer's speakers. Most current sound cards use a method called FM synthesis for sound generation. This means that for every instrument, a mathematical function which theoretically sounds like the required instrument is stored in the sound card hardware, and is played whenever that sound is required. Unfortunately, it turns out that most instruments cannot be described very accurately using the simple mathematical functions used by FM synthesis, and the result usually sounds like electronic beep-beeps, rather than the required instrument. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ The XM File Format ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ As an attempt to solve the problem arising from FM synthesis, several formats, the first of which was called the Amiga Music Module, or MOD for short, were created. The idea of these formats was to include, other than the information on the notes themselves, a single-note recording of every instrument in use within the piece. This greatly increased the playback quality, since an actual recording, rather than a simulation, served as the basis for each instrument. Its main fallbacks were the increase in file size and the increase in processing time required to play the module (since the synthesis is performed in software and not in hardware). As processor speeds increased, more powerful music module formats were developed. Of note are the ScreamTracker module (S3M), Impulse Tracker module (IT), and FastTracker Extended Module (XM). All are based on the same idea of placing recordings, or "samples", of each instrument used in the module, within the actual module. XM files were created by Vogue and Mr.H of the demo group Triton. They are supported by Triton's tracker, called FastTracker, which can be downloaded as shareware from any popular shareware download site (www.shareware.com, for example). It is also supported by most reasonably new players, such as CubicPlayer, which is also a very common shareware program. You can get more XM modules than you can possibly use from Walnut Creek's Hornet music archive, at www.hornet.org. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Using MidiMix ÍÍÍÍÍÍÍÍÍÍÍÍÍÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ All right, if you're really afraid of messing up, here's an exact description of what to do when you run MidiMix. Go into the MidiMix directory, and run the program MidiMix by typing MIDIMIX and pressing Enter at the DOS prompt. If you are running Windows 95, click on Start, then Run, and then type the full path of the MidiMix program (e.g. C:\MIDIMIX\MIDIMIX), and press Enter. You will be prompted to enter a MIDI input file name. This file will be converted into XM format. You can type any file name, with or without a pathname. A default extension of .MID is assumed if no extension is specified. If you don't type a pathname, the current directory (the MidiMix directory) is assumed to be the directory in which the MIDI file is found. After typing the filename, press Enter. Now type the output file name, usually the same name but ending in an XM extension, and press Enter again. A default name will be suggested, and can be accepted by pressing Enter without typing anything. An .XM extension is added to the filename if you don't specify an extension. Both file names must be legal names, or an error will occur and MidiMix will abort. You now have to choose the number of rows per quarter note. This decision depends on the quality of the file you want to generate vs. the file size. For instance, choosing 4 rows per quarter note means that the XM file will match the timing of the MIDI file up to 1/16 of a note, so that shorter notes might not be transferred to the XM file. In short, the more rows you use per quarter note, the more accurate the XM file will be in terms of timing of the instruments. Naturally, increasing the nubmer of rows per quarter note will also enlarge the file. It is common to use a power of two for the number of rows per quarter note, and values of either 4 or 8 are usually acceptable, unless the MIDI file is particularly fast or complex. In any case, you can always regenerate the file if you find it is not suitable for your needs. You must now type in a transpose value. You will usually just type 0 here, but this option can be used for some unusual MIDI files. Typing 1 or +1 will cause the resulting XM file to be one octave higher than the original MIDI file, whereas -1 causes the resulting XM file to be one octave lower than the original. The program will now display a progress report and inform you when the file has been generated, or of any errors that occured and stopped the execution. To play your module, you will need to add samples to it, and then use a program such as Cubic Player to play it. Two methods of adding samples to your modules are described below. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Adding Samples to MidiMix ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ As explained in the section "What is XM?", XM files require samples, or recordings, of all instruments used in the file, in order to play correctly. After generating the XM file, you will need to add samples to it on your own. This can be done either on a per-module basis, or by defining samples to be used automatically by MidiMix for all modules requiring a certain recording. The former method is simpler, but requires FastTracker. Create your module as explained above, and then edit it in FastTracker. You will see instrument names for the various instruments in use. Replace each instrument name with an appropriate sample. The second method is better suited for people who regularly use MidiMix and would like to use a certain sample in every module that contains that instrument. For instance, you may have a high-quality trumpet sample that you would like to use in all modules that contain trumpets. To do this, you must first find out the hex value of the instrument in the General MIDI table. The General MIDI table lists all instruments supported by the General MIDI standard, and gives a number to each instrument. A list of the instruments and their matching hex values can be found in the file PRESET.TXT. Next, save the sample you want to use as a FastTracker Extended Instrument file (with an XI e. The file name should be the two-digit hex value with an .XI extension. Copy this file to the SAMPLES subdirectory of the MidiMix directory, replacing the dummy file that was previously found there. From now on, all modules that require the use of that particular instrument will automatically include the sample you prepared. A word of warning: you _must_ tune your instrument before using it. Most modules don't use tuned samples, and sometimes samples from the same module are not even tuned with each other. Musicians can tune samples by comparing them to a known pitch; the rest of us usually have to use a spectrum analyzer to find the pitch of a sample. You might not be able to tell the difference between a tuned and untuned instrument, but believe me, you'll hear the difference when you play a file generated with two instruments which don't match tuning. It sounds horrible. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Getting Samples for Your Modules ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ When I originally wrote this program, I intended for it to come with a library of samples, so that your MIDI files could immediately be converted into playable XM files. As it turned out, however, this was easier said than done. I had no way of recording the 128 different samples of the General MIDI standard, so I tried using samples from modules that I already had. After hours upon hours of painstaking searches and tunings, I gave up on this, because their quality was not acceptable and it was a real pain to tune them. There are lots of sets of samples floating around on the Internet, which can be freely downloaded, but to my knowledge there is no complete set of tuned instruments corresponding to the General MIDI standard, which can be used for free. If you know otherwise please let me know. In any case, the Hornet archive has an excellent collection of samples (http://www.hornet.org/music/samples/). You can use programs like FastTracker to convert files from various formats (such as Gravis Ultrasound PAT files and WAV files) into XI. Good luck. A small MIDI file sometimes contains references to many similar instruments, and as a result the output XM file may become very large because of the many instruments it must include. In some cases, you may want to reduce the XM file size by defining sample aliases. Sample aliases simply mean that two different MIDI instruments will be treated as identical, and only one entry will be added to the instrument list in the XM file. Thus, for instance, you may want to define instrument 01 (electric grand piano) to be identical to instrument 00 (acoustic grand piano). This is done in the following way. Use a text editor such as DOS's EDIT or Windows' Notepad to edit the file SMPALIAS.DAT in the MidiMix directory (yes, the one that says "do not edit this file"). Find the line containing the instrument code you are looking for, _in decimal_. For instance, hex value 1F is decimal value 31. Replace this line with the decimal value of the instrument to which you want to alias the file. For example, to change hex value 1F to 1E, you would change the 31 to 30. Make no other modifications to the file. After saving the file, modules created with MidiMix will use the sample in 1E.XI in all places which ordinarily would have used the sample in 1F.XI. Furthermore, if a MIDI file contains references to both instruments 1E and 1F, the output file will join the two instruments together, so that only one copy of instrument 1E appears in the final XM file. You can alias as many instruments as you like to a single instrument, but you can't make an alias chain. That is, you can't have instrument 1F aliased to 1E and 1E aliased to 1D. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Known Bugs and Limitations ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ MidiMix is not guarranteed to support every single MIDI file there is. Some rarely-used sections of the MIDI standard were not implemented in the program, since I could not find a single MIDI file which supported them. Also, some advanced MIDI commands are ignored by MidiMix and are not transferred to the XM file. These include pitch wheel changes, pan sliding and a few others. If enough of you register MidiMix, I promise to add support for these options in a future version. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Version History ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ 1.10: Program can now process MIDI files of any size (previously limited to MIDI files up to 64K). Also corrected a couple of cryptic error messages. 1.00: First version released. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Contacting the Author ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ I'd like to hear what you have to say about this program: bug reports, suggestions for improvements, and other comments. Also, if you have a sample you wish to contribute, I will consider it for the next version of MidiMix. All of these issues, and anything else related to MidiMix, can be e-mailed to me at: zvikabh@aluf.technion.ac.il If you like, you can send me PGP-encoded mail. My PGP public key can be found in the file PUBLIC.KEY. You can get the latest version of MidiMix, and of other programs I write, from my web site at: http://www.technion.ac.il/~zvikabh/software.html To send registration checks, cash or money order, please send snail mail to the following address. The registration fee is $10. Please send it by air mail if you live outside Israel, otherwise it could take months until it gets here. For users wishing to register, specify the preferred method of delivery: by MIME-encoded e-mail, FTP, or IRC DCC file transfer. Sending the software in snail mail is not possible. My snail mail address is: Zvika Ben-Haim 7 Martin Buber St. Haifa 34861 Israel