An example of using MIDI2TE

Included in the package is an example MIDI file. This file will be used to demonstrate how to use MIDI2TEX . The example file was generated by Cubase. Track 1 contains Cubase mastertrack information (time signature, clef etc.) and no notes. MIDI2TEX skip this track by default. Translation of the file is now initiated by entering
            MIDI2TEX EXAMPLE -dFILE
The screen will show some program info and start executing. After termination of the program two files are generated. One is called EXAMPLE.TEX and the other EXAMPLE.MLG. Use any editor to inspect the content of the files. EXAMPLE.TEX will look like:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%    TEX translation of MIDI File :
%          example.MID
% 
%        Written by Hans Kuykens
%  this translation of date : 9-6-1992
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\input musicnft
\input musictex
\input musicadd
\input musictrp
\normal
\def\nbinstruments{3}
\generalsignature{0}\relax
%\centerline{\enorme PUT A NAME HERE and remove %}
\medskip\centerline{\moyen example.TEX}
\rightline{translation by MIDI2TeX}
\rightline{by H.J.P. Kuykens}
\generalmeter{\meterfrac{4}{4}}%
%\raggedlinestrue % uncomment for ragged right lines 
%\relativeaccidentals
\debutmorceau
%measure 1
\NOtes\uptext{Track 3} \hl q&\uptext{Track 2}
    \soupir &\uptext{Track 1} \qu J\enotes\relax
\temps\NOtes&\zq j\zq {^k}\qu g&\soupir \enotes\relax
\NOtes\ibl0o{0}\qb0p\qb0q&\soupir &\qu G\enotes\relax
\NOtes\qb0p\tbl0\qb0o&\zq k\zq j\ql g&\soupir \enotes\relax
%measure 2
\barre
\NOtes\cl n\ds &\soupir &\qu J\enotes\relax
\NOtes\hlp l&\zq {^k}\zq j\ibl1g{-1}\qb1g\zq j\zq k\tbl1\qb1g&
    \qu G\enotes\relax
\temps\NOtes&\soupir &\qu {_I}\enotes\relax
\temps\NOtes&\zq g\zq {_i}\qu {=k}&\qu {=I}\enotes\relax
%measure 3
\alaligne
\NOtes\ibl0k{0}\qb0k\qb0l&\soupir &\qu J\enotes\relax
\NOtes\qb0n\qb0k&\zq j\zq {^k}\ql g&\soupir \enotes\relax
\NOtes\qb0l\qb0o&\soupir &\qu G\enotes\relax
\NOtes\qb0n\tbl0\qb0l&\zq k\zq j\qu g&\soupir \enotes\relax
%measure 4
\barre
\NOtes\ccl k\pt g\ds &\soupir &\qu J\enotes\relax
\temps\NOtes\hl j&\zq j\zq {^k}\ql g&\qu I\enotes\relax
\temps\NOtes&\zh {_i}\zh g\hu {=k}&\qu J\enotes\relax
\finmorceau
\bye
Now you can process EXAMPLE.TEX directly with TEX. Be sure not to use LATEX because TEX cannot hold that many macro definitions. After processing the above example you will find out that the score comes out pretty ugly. The bass notes on the first score line are way beyond and the melody line is on score 3. Now rerun MIDI2TeX with the following command:
            MIDI2TEX EXAMPLE -o1,4,3,2 -b2
This command now reorders the tracks and assigns the bass clef to the second track. The resulting score will now look much better.

In addition to the example file mentioned above I also included some MIDI files which I received from Volkmar Zitz which were a great help for tracking down the errors in previous versions. Theses files are ARC'ed into EXAMPLES.ARC. There is also a batch file included which starts the translation processing of these files. This is of course only for DOS users. ST users will have to do it manually unless they are using a shell.