========================================================================== MIDIG v1.01 Copyright (c) 1996-1999 Carlos Rodriguez Butragueno All rights reserved MIDIG v1.01 documentation - English version ========================================================================== DISCLAIMER This program is freeware, so it may be freely distributed for non-commercial purposes. This software is provided "as is" without express or implied warranty. The author is not responsible for any damage caused by this program. ========================================================================== Note from the author: I hope this doc to be useful despite of my English. ========================================================================== Contents ========= 1 - Introduction 2 - Installation 3 - Quick guide 4 - Complete guide 4.1 - Program structure 4.1.1 - File selector 4.1.2 - Playback screens 4.2 - Program keys 4.3 - Command line options 4.4 - Configuration file 4.5 - Instruments file 4.6 - Using the program 4.6.1 - Normal mode / continuous mode 4.6.2 - MIDI functions 4.6.3 - Limits in this version 5 - Credits 6 - Contact address ========================================================================== 1 - Introduction ================= MIDIG is a MIDI file player that makes use of wavetable synthesis and digital effects to generate the sound. minimun requirements: DOS: Pentium 100, 8 Mb RAM, 12 Mb HD, VGA, SB16 W95: Pentium 133, 16 Mb RAM, 12 Mb HD, VGA, SB16 recommended: Pentium 200, 32 Mb RAM, 12 Mb HD, VGA, SB16 works under DOS and Win95/98/NT (not tested with other platforms) Features: ---------- * works at 44100 Hz, 16 bits, stereo * up to 64 synthesis channels * digital effects: reverb and chorus * multipoint interpolation * resonant filters * WAV rendering * recognizes more than 30 MIDI messages * playlist 2 - Installation ================= Once decompressed, it should be the following files: midig.exe 339,375 executable program gm.nom 1,024 instruments names gm.dat 73,283 instruments data file notas.dat 2,864 used by the instruments data file midig.cfg 416 configuration file mdg_repr.lst 56 playlist manual.txt 38,592 documentation demo.mid 24,250 MIDI file crdcu.mid 4,426 MIDI file desenf.mid 13,059 MIDI file gmlib1.lbr 1,493,251 samples library 1 gmlib1.ind 1,219 samples library 1 index gmlib2.lbr 3,147,140 samples library 2 gmlib2.ind 1,938 samples library 2 index gmlib3.lbr 3,381,978 samples library 3 gmlib3.ind 2,952 samples library 3 index gmlib4.lbr 3,560,217 samples library 4 gmlib4.ind 3,646 samples library 4 index Besides this, it should be an environment string BLASTER with the information about the sound card. This environment string is created automatically by the sound card installation program. In order to check its existence, you can write (from the DOS prompt, or from a DOS window if you are running Windows): C:\>set one of the lines should be similar to: BLASTER=A220 I5 D1 H5 P330 T6 E620 in each case the fields and values following 'BLASTER=' may be different (the example ones are from a possible configuration of the AWE32). 3 - Quick guide ================ Type 'midig' from the directory in which you have Midig installed. If all works correctly, it should appear the file selector. Use the cursors to select a MIDI file and press ENTER to play it. After the necessary instruments are loaded, one of the playback screens appears. You can use F5 to F8, F10, SHIFT+F5 to SHIFT+F8 and ALT+F6 to choose between different information screens during the playback of the MIDI file. The section 4.1.2 explains with more detail the information given in each screen. For getting back to the file selector, press ENTER or F3. If you want to exit from the file selector without choosing a file, press ESC or BACKSPACE. For exiting from the program, you will have to press ESC one or more times, depending on you being in the file selector, the playback screens, etc. While in the file selector or during the playback of a file, you can press F1 to display a screen of some useful keys. Go to the section 4.2 for a complete list of the programs keys. 4 - Complete guide =================== This chapter describes the different parts of the program (data screens, keys, configuration file, etc.) The program keys are described in the section 4.2 4.1 - Program structure ------------------------ The program has two independent blocks: the file selector and the playback screens. 4.1.1 - File selector ---------------------- The file selector is divided in two parts: the directory of the disk (at left), that shows the files with .MID extension in the directory, and the playlist (at right), that lets you manage a list of selected MIDI files. The playlist is automatically loaded when the program is run, and is saved, if there has been changes, at exit. The file is called 'mdg_repr.lst', and a backup copy is generated ('mdg_repr.bak') before saving the new updated playlist. 4.1.2 - Playback screens ------------------------- During the playback of a MIDI file there are many data screens with information about the tracks of the file, the state of the MIDI controllers, synthesis channels, etc. 4.1.2.1 - Common information ----------------------------- There is some data shared by several screens: - Peak level measurer: (left-down) Shows the highest value of the output signal in each instant. Scale is in decibels (dB), and the full range is 90.3 dB (15 bits with sign). The most important thing is to keep the output level below 0 dB, because to exceed this value means that the signal has been limited to the maximun output value. The result is a more distorted sound as the signal is being "accumulated" at the maximun value. In the other hand, is convenient that the signal to be as high as possible for a better signal to noise ratio. - CPU used measurer: (right-down) Shows the percentage of CPU used for sound synthesis. - Other indicators: In the upper part of the screen are shown more indicators. The most important are: - Main volume: It's at left. Can be changed with '+' and '-'. - Elapsed time: At left, below the main volume. Shows the elapsed time of the MIDI file (min:sec:cent). - Total length: In the same line as the elapsed time, but at the other side of the screen. Shows the total length of the MIDI file. - Normal mode / continuous mode arrow: Near the elapsed time is and arrow that shows the current playback mode: normal (<-) or continuous (->). Go to the section 4.6.1 to obtain more information about the meaning of these modes. 4.1.2.2 - Tracks information (F5) ---------------------------------- By pressing F5 we get the MIDI file tracks screen. Type 0 MIDI files use only one track in which are all the MIDI messages. In the type 1 MIDI files, the MIDI messages are organized in several tracks, and the first one (track 0) is reserved for tempo, measure, etc. Anyway, Midig will accept any MIDI file no matter the type, provided that the number doesn't exceed the limit of tracks that Midig can handle (128 in this version). The last column at right shows how many seconds left for the next MIDI message of each track. That's only orientative since it depends on the current tempo; a tempo change will make the number of seconds to change as well. 4.1.2.3 - MIDI data (F6) ------------------------- Shows the state of various of the parameters that can be changed with MIDI messages. The information is shown for each one of the 16 MIDI channels. The last column is the number of active notes in that moment. Besides this MIDI data screen, another one, accesible with ALT+F6, shows the data received through the NRPN messages that are seen. This screen has several pages, each one headed by one of those NRPN messages (this is useful only if there is so many data that it doesn't fit on the screen). 4.1.2.4 - Synthesis channels (F7) ---------------------------------- With the F7 key we can see information related to the synthesis channels. If we are using 32 channels or less, we could see more information (this may be useful if we are adding or modifying instruments). 4.1.2.5 - Instruments (F8) --------------------------- The instruments screen shows some information about the selected instrument, such as the volume level or the filter cutoff point for each sample. 4.1.2.6 - Screensaver ---------------------- There are three versions of the screensaver. The first two only show the name of the MIDI file and the elapsed time. The third leaves the screen just black. The screensavers are activated with SHIFT+F5, SHIFT+F6 and SHIFT+F7. 4.1.2.7 - Karaoke ------------------ Some MIDI files include the letter of the song in a format used by the "MIDI karaoke" programs. If any of the tracks (in the tracks screen, F5 key) shows the text "Karaoke", "Soft Karaoke" or "Words", this may be one of these files. Press SHIFT+F8 and should appear the letter of the song, changing from grey to white while the song is playing. 4.1.2.8 - Graphic spectrum analyser (not finished) --------------------------------------------------- We can see the output signal spectrum by pressing F10. The left channel is above, and the right is below. 4.2 - Program keys ------------------- In this section are listed all the keys of the program, with a brief description of each one. From within the program you can see the most useful keys just pressing F1. 4.2.1 - File selector keys --------------------------- A normal key (letters, numbers, etc.) activates the quick find mode. Also the backspace key can be used. Every other key cancels this mode. F1 : help F2 : disk drive change esc / backspace : exits from the selector. If we entered the selector by pressing ENTER or F3, then we'll get back to the playback screens. If it was the program who entered the file selector (because the MIDI file ended, or because we just entered in the program), then we'll exit from the program. tab : swaps the selection bar between the disk directory and the playlist. up / down : moves the bar pgup / pgdn : moves the bar 10 lines home / end : moves the bar to the first/last line ALT + A : saves the playlist in ASCII format ALT + L : loads the playlist from ASCII format In both cases the file is 'lista.txt' CTRL + up/down : Works only in the playlist. CTRL + pgup/pgdn The position of the selected file CTRL + home/end is changed along with the bar. CTRL + right : puts all the files into the playlist CTRL + left : removes all the files from the playlist right / ins : puts the file into the playlist left / del : removes the file from the playlist space : equal to "right" then "down" enter : plays the file or changes the directory CTRL + enter : plays the file in continuous mode Active keys during the disk drive change panel: ------------------------------------------------ A B C D ... : sets the disk drive esc / enter : return without changes 4.2.2 - Keys for the playback screens -------------------------------------- The keys given below are common to all the playback screens, but some of them have their own specific keys. In the event of a coincidence, the specific keys have more priority. Common keys: ------------- F1 : help esc / ALT+X / ALT+Q / CTRL+Q : exits the program F3 : goes to the file selector enter : goes to the selector or plays the next MIDI tab / CTRL+enter: normal mode / continuous mode + / - : inc/dec the main volume V / v : resets the main volume to its initial level F5 : tracks screen F6 : MIDI data screen ALT + F6 : MIDI data screen (drums NRPNs) F7 : synthesis channels screen F8 : instruments screen F10 : spectrum analyser SHIFT + F5 : screensaver 1 SHIFT + F6 : screensaver 2 SHIFT + F7 : screensaver 3 SHIFT + F8 : karaoke screen backspace : goes to the last information screen pgup / left : goes backwards 60 seconds pgdn / right / CTRL+right : advances 2 seconds home / CTRL+left : restarts playing the file space : swaps between fast forward / normal playback Z : fast forward X : normal playback f : pauses the playback of the MIDI file F : similar to 'f' but without stoping sounds end : stops the playback of the MIDI file z : solo channel / all channels on x : toggles currently selected channel O : all sounds off ALT + R : resets the sound card ALT + U : like ALT+R, but waits for a key press ALT + T : resets the used channels counters ALT + I : swaps the left and right channels m : on/off filter envelope M : on/off filter resonance d : on/off digital effects D : changes the "surround" level > / < : inc/dec the reverb send level N / n : inc/dec the chorus send level b : inverts the drum mode of channels 10 and 16 g : on/off default level of reverb L / l : changes the "info. sample" parameter c : clears and repaints the screen S : exits temporarily to DOS There is a set of keys that let you play 17 semitones: 2 3 5 6 7 9 0 q w e r t y u i o p the additional keys for controlling the notes played are: ? / ' : inc/dec the octave a : repeats the last note s : turns off the last note ] / [ : changes the instrument to be used Keys for the tracks screen (F5) -------------------------------- up / down : scrolls the tracks information Keys for the MIDI data screen (F6) ----------------------------------- up / down : selects a channel ALT + E : toggles the edit mode ALT + P : toggles the selected channel as drum channel Only for the editing mode: left / right : field change + / - : value change Keys for the MIDI data screen (drum NRPNs) (ALT+F6) ---------------------------------------------------- up / down : page change Keys for the synthesis channels screen (F7) -------------------------------------------- ALT + E : toggles the edit mode Only for the editing mode: up / down : instrument finetune change left / right : loop start change (1 sample) ALT + left/right: loop end change (1 sample) pgup / pgdn : loop start change (16 samples) ALT + pgup/pgdn : loop end change (16 samples) CTRL + up/down : loop end change (1/16 of sample) Keys for the instruments screen (F8) ------------------------------------- up / down : field change left / right : sample change + / - : value change K / k : inc/dec the "KSL" value Keys for the karaoke screen (SHIFT+F8) --------------------------------------- ALT + A : writes the song letter to 'letra.txt' 4.3 - Command line options --------------------------- Writing 'midig /?' brings up a list with the options of the program. Here is a more detailed explanation: /lxxx uses the given directory as the local directory. With 'midig /l c:\mid' the program will use 'c:\mid' as the local directory, that is, it will expect to find in 'c:\mid' the following files: (between brackets are the default names for these files) - the configuration file (midig.cfg) - the playlist file (mdg_repr.lst) - the instruments file (gm.dat) The path for the samples is relative to the local directory (although both this path and the other files can be specified by an absolute path). /fxxx uses the specified configuration file. The default name for the config file is 'midig.cfg'. With 'midig /f mid.cfg' the file 'mid.cfg' will be used as the config file. /c# active MIDI channels mask (hexadecimal). Bits set to 1 mean active channels. For example, with 0FFF we leave active 1 to 12, and inactive 13 to 16. /gxxx writes a WAV file. Writing 'midig -g mid.wav' we will enter in the program as usual, but instead of using the sound card, the program will write the sound to the file 'mid.wav'. /v shows the options read from the config file. Rewrites in the screen the options read from the config file. /m# mixing frequency Sets the mixing frequency for the generated sound. The minimun value is 11025 Hz, and the default value (and recomended) is 44100 Hz, though this value can be exceeded when generating a WAV file. /t loads all samples Loads all the samples in memory, instead of loading only the necessary ones for the MIDI file to be played. /e# advances to the given position (in seconds) before starting to play. For example, with 'midig /e 30' the program will advance automatically 30 seconds before starting to play the file (only the first time. If we restart the file, or we load another file, it will be done as usual). /n# main volume (dB) Sets the initial main volume. For example, if we want an initial volume of -3.2 dB, we may type 'midig /n -3.2'. 4.4 - Configuration file ------------------------- This section describes the parameters of the config file, as well as their default values (they all are optional). The default name for the config file is 'midig.cfg'. version = 1 config file version. Must be 1 for this version of the program. main_volume main volume (dB). range: -79.0 .. 24.0 def: -6.0 surround "surround" effect level. range: 0 .. 3 def: 0 (no effect) swap_channels swaps the left and right channels. values: YES / NO def: NO mono_recording writes a mono WAV instead of stereo. values: YES / NO def: NO dat_file instruments file name. def: gm.dat samples_dir samples directory. def: . extens file types shown in the file selector (separated by commas. ej.: *.mid, *.kar). def: *.mid instr_info number of the initial instrument in the instruments screen. range: 0 .. 127 def: 0 info_screen initial playback screens. def: 5, 8 channels maximun number of synthesis channels. range: 1 .. 64 def: 64 mixing_freq mixing frequency. range: 11025 .. 44100 def: 44100 use_digital_effects activates the digital effects. values: YES / NO def: YES max_CPU_percent maximun percentage of CPU used for synthesis range: 10 .. 95 def: 95 max_note_on_msg maximun of note-on messages processed in each block (3 msec at 44100 Hz) range: 0 .. 1000 (0=inactive) def: 5 echo_params echo parameters (coeff., level, filter) coeff: coefficient of each repetition range: -1.0 .. 1.0 def: 0.4 level: effect level range: 0.0 .. 100000.0 def: 0.3 filter: low pass filter level for each repet. range: 0.0 .. 1.0 def: 0.5 4.5 - Instruments file ----------------------- In this section are explained the fields and units of the instruments file. Every field in the instruments file is a string or an integer. The default name for the instruments file is 'gm.dat'. SAMPLE_WAV { sample_name = { sample, finetune, note, loop_sta, loop_len } ... } sample : name of the file (in WAV or WCS format) finetune : finetuning in cents of semitone note : base note of the sample (original note played) loop_sta : loop start point loop_len : > 0 number of samples in the loop < 0 loop end point = 0 no loop the point format for loops is: sample:fraction where 'fraction' (0..15) is 1/16 of sample. Loops are always forward. Neither backward nor "ping-pong" loops are implemented. The end point of the loop is calculated this way: if loop_len.sample < 0 end.sample = -loop_len.sample end.fraction = loop_len.fraction else end = loop_sta + loop_len examples: a 100 samples length sound with the loop starting in the second sample (sample 1) to the end of the sound: 1:0, 99:0 or 1:0, -100:0 for covering all the sound with the loop: 0:0, 100:0 or 0:0, -100:0 a loop starting at 1:2 with 7:3 samples length: 1:2, 7:3 or 1:2, -8:5 a loop starting at 1:10 with 7:12 samples length: 1:10, 7:12 or 1:10, -9:6 If a sound has 'n' samples, and 'x' is the read position, it's always true that: 0 <= x < n the same way, in a sound with 'n' samples, loop start point 'i' and loop end point 'f', it's always true that: 0 <= i < f <= n ( i >= f means no loop) 0 <= x < f before the first repetition i <= x < f during the repetitions for example, if the loop is from 1:2 to 7:3, then always: 1:2 <= x < 7:3 during the repetitions (actually the program may need to read samples beyond the end for interpolation, but this is not a problem bacause the program adds more samples automatically if necessary). SAMPLE_RAW { sample_name = { sample, bits, sign, channels, freq, finetune, note, loop_sta, loop_len } ... } sample : name of the file (a raw file with no header) bits : 8 / 16 bits sign : CON_SIGNO / SIN_SIGNO (signed / unsigned) channels : MONO / ESTEREO (mono / stereo) freq : sample frequency (Hz) finetune : finetuning in cents of semitone note : base note of the sample (original note played) loop_sta : loop start point loop_len : loop length / loop end point ENVOLV { envelope_name = { delay, attack, hold, decay, sustain, release, overlapping_release } ... } delay : unit = 4.7 msec. (0 = 0 msec.) attack : unit = 4.7 msec. (0 = 0 msec.) hold : unit = 6.5 msec. (0 = 0 msec.) decay : unit = 36 msec. (0 = 16 msec.) sustain : 0 .. 96 -> -97.0 .. -1 dB (unit = 1 dB) 97 .. 127 -> -0.968 .. 0 dB (unit = 0.032 dB) release : unit = 36 msec. (0 = 16 msec.) overl_rel : unit = 36 msec. (0 = 16 msec.) MODUL { modulation_name = { freq, delay, vibrato, tremolo } ... } freq : frequency (mHz) delay : delay (msec) vibrato : vibrato level (unit = 1 cent of semitone) tremolo : tremolo level (-64..64) (unit = 0.1875 dB approx.) INSTRUM { instr_number = { modul, env, env2, flt_env, flt_env_level, tun_env_level, fltQ, transpos, spec_tuning, (sample,level,flt,last_note)... } ... } modul : name of the modulation env : name of the volume envelope 1 env2 : name of the volume envelope 2 flt_env : name of the filter/tuning envelope flt_env_level : flt_env to filter (-128..127, u=172.27 Hz) tun_env_level : flt_env to tuning (-128..127, u=1/6 of semitone) fltQ : filter resonance (0..127) transpos : transposition (-120..120 semitones) spec_tuning : special tuning (x=1..10, 1 sem. every x notes) sample : name of the sample level : sample volume level (0..255, 64 = no modify) flt : filter cutoff point (0..127, u = 172.27 Hz) last_note : highest note in the range of the sample PERCUSION { note = { env, env2, flt_env, flt_env_level, tun_env_level, transpos, excl_group, sample, level, flt, pan } ... } grupo_excl : exclusion group (0 = no excl.) pan : panning position (-64 .. 64) (the other parameters are explained in INSTRUM above) 4.6 - Using the program ------------------------ This section is about some external and internal aspects of the program. 4.6.1 - Normal mode / continuous mode -------------------------------------- These modes determine what's going to happen when the playback of the MIDI file finishes, or when ENTER is pressed: - normal mode: the file selector appears. - continuous mode: the next file from the playlist or the disk directory is played; if it doesn't exists, then the file selector appears. 4.6.2 - MIDI functions ----------------------- n: MIDI channel (0..15) MIDI message Code (hex) Description -------------------------------------------------------------------------- Note on 9nH kk vv Note kk (0..127) on, velocity vv (1..127) vv=0 means "Note off" Note off 8nH kk vv Note kk (0..127) off vv ignored Pitch bend EnH bl bh Pitch bend. The value specified by bh|bl (14 bits) allows slides of +/- 2 semitones. Can be changed using "pitch bend sensitivity". Program CnH pp Program (instrument) change. If n=9, change drumset is selected. More channels can be set as a drum channel using "part to rhythm allocation". CTRL 0 BnH 00H cc Bank select. Does not take effect until a program change. CTRL 1 BnH 01H cc Modulation wheel CTRL 5 BnH 05H cc Portamento time CTRL 6 BnH 06H cc Data entry (RPN and NRPN) CTRL 7 BnH 07H cc Volume (def=100) CTRL 10 BnH 0AH cc Pan (def=64 center) CTRL 11 BnH 0BH cc Expression (def=127) CTRL 64 BnH 40H cc Sustain pedal CTRL 65 BnH 41H cc Portamento on/off CTRL 91 BnH 5BH vv Reverb send level (vv=0..127) CTRL 93 BnH 5DH vv Chorus send level (vv=0..127) CTRL 98 BnH 62H cc NRPN low byte CTRL 99 BnH 63H cc NRPN high byte CTRL 100 BnH 64H cc RPN low byte CTRL 101 BnH 65H cc RPN high byte CTRL 120 BnH 78H 00H All sound off CTRL 121 BnH 79H 00H Reset all controllers (1,5,11,64,65 and pitch bend) CTRL 123 BnH 7BH 00H All notes off RPN 0000H BnH 65H 00H 64H Pitch bend sensitivity in semitones (def=2) 00H 06H vv NRPN 0120H BnH 63H 01H 62H Filter cutoff frequency modify 20H 06H vv (vv=40H -> no modify) NRPN 0121H BnH 63H 01H 62H Filter resonance modify 21H 06H vv (vv=40H -> no modify) NRPN 0163H BnH 63H 01H 62H Envelope attack time modify 63H 06H vv (vv=40H -> no modify) NRPN 18rrH BnH 63H 18H 62H Pitch coarse of drum instrument note rr rr 06H vv (vv=40H -> no modify) NRPN 1CrrH BnH 63H 1CH 62H Pan of drum instrument note rr rr 06H vv (vv=40H -> middle) NRPN 1DrrH BnH 63H 1DH 62H Reverb send level of drum instr. note rr rr 06H vv (vv=0..127) NRPN 1ErrH BnH 63H 1EH 62H Chorus send level of drum instr. note rr rr 06H vv (vv=0..127) SYSEX F0H 41H ?? 42H Reverb type (vv=0..7) 12H 40H 01H 30H 3,4 -> "Hall 1" other -> "Room 3" vv xx F7H SYSEX F0H 41H ?? 42H Part to rhythm allocation 12H 40H 1pH 15H p=part (0..15), vv=00/01 (sound/rhythm) vv xx F7H def: part 0 plays drums (MIDI channel 9) all other parts play sound 4.6.3 - Limits in this version ------------------------------- MIDI tracks : 128 synthesis channels : 64 envelopes : 512 modulators : 256 samples : 1024 samples per instr. : 16 instruments : 1024 drum instruments : 1024 karaoke messages : 2048 5 - Credits ============ This program uses the PMODE/W v1.33 DOS extender. DEMO.MID, CRDCU.MID and DESENF.MID created by Jose A. Rodriguez Butragueno 6 - Contact address ==================== E-mail: carlosfz@interlink.es butra@casa-de.es WWW: http://members.tripod.com/midig/