mdvi version 0.5.0 Copyright 2003 Juergen Fleck, license: GPL mdvi stands for Music to DVI. Takes the name of an M-Tx source as parameter and produces selected output files. Invocation: mdvi [--help|--version] [-l] [-m ] [-o(i|s|f|a|h)] [-p ] filename[.[mtx]] The commandline parameters preceeding the filename may come in any amount and order, but the filename must be the last parameter, be it with or without filename extension. Short parameters (introduced by a single dash "-") may be grouped, i.e. "-l -of" is equal to "-lof". This is allowed as long as not more than one of them expects a parameter, such as -p and -m. After compilation, unneeded files from intermediate compilation stages will be removed. Overview of the compilation stages: foo.mtx -- M-Tx ------> foo.pmx foo.pmx -- PMX -------> foo.tex, foo.mid foo.tex -- MusiXTex --> foo.dvi foo.dvi -- dvips -----> foo.ps foo.dvi -- dvipdfm ---> foo.pdf or foo.ps -- ps2pdf ----> foo.pdf filename.mtx will be preprocessed by M-Tx and PMX and finally TeXed. If type M postscript slurs are used (detected by occurrence of "input musixpss" in the M-Tx source), then musixpss and mpost are run as well. Former versions of mdvi octavated voices with G8 clef down. This is not done any more. Just use the PMX option in your midi declaration: T+0-12+0+0 (see example for mdvi -m option below). Dependencies: - gawk is used for temporary modifications on the M-Tx source. - M-Tx (prepmx) is used to produce the PMX source. For correct MIDI handling, M-Tx pre0.54a is required. - PMX (pmxab) is used to produce MIDI and TeX output. - A MusiXTeX installation is needed to process the resulting TeX file. - dvips is used to generate Postscript output. - dvipdfm is used to generate PDF output. If the PMX option Ap is found in the M-Tx source (a line starting with "%%" and containing Ap), then ps2pdf is used instead (and eventually a temporary PS file is created if you did not choose PS as output as well). This is because dvipdfm is incompatible with type K slurs. Limitations: - The input file is expected in the current directory, absolute pathnames are very likely to break everything (untested). - The input filename should not contain spaces (untested). - Tested in a Linux environment with bash. Commandline parameters: --help prints this information --version just prints out the version and exits -l LaTeX will be used for compiling the filename.tex file instead of plain TeX. This option is very unlikely to be used because PMX produces plain TeX output, but maybe there are people who are able to change that. Anyway, mdvi does not check whether LaTeX is appropriate. You are on your own. -m If you want to switch easily between different MIDI instruments without changing the M-Tx source, mdvi gives you the convenience of choosing one of any predefined MIDI instrument set in your M-Tx source. Such a set is an M-Tx comment line starting with "% MIDI ". If you make an invalid MIDI instrument set selection, you will be warned, and it will be ignored. The default MIDI instrument set can be defined via the environment variable MDVI_MIDI, see "Environment variables". The predefined MIDI-selection "none" (in capital or lower letters) disables this feature, and you are spared the extra PMX pass for the MIDI output. Syntax of a MIDI instrument set in the M-Tx source: % MIDI Example excerpt from an M-Tx source: % The following one will be the default because it is the first one % without any special syntax. It will simply be passed to PMX. % The two lines following it define the MIDI sets vh and piano %% Ii36:100:12:100 % MIDI vh Ii36:100:12:100 % MIDI piano Iipipipipi % Finally, we define - for all - tempo, balance and octavation for the % 3rd instrument from the top (as should be done for style SATB4). %% It100b40:56:72:88g20T+0-12+0+0 Selecting one of the sets by invoking mdvi: mdvi foo.mtx This will leave the "% MIDI" lines as they are, thus letting PMX ignore them. This results in the first PMX MIDI line being chosen: "Ii36..." mdvi -m vh foo.mtx This will change the "% MIDI vh Ii36..." line to "%% Ii36..." such that it will simply override the first line. mdvi -m piano foo.mtx This will make the "Iipipi..." line active. -o(i|s|f|a|h) One or more of the suffix letters to -o may be specified. They select the requested output files: i DVI (default) s PS f PDF a all of the above h displays help regarding the -o parameter Mnemotechnic note: The letters chosen here correspond to the last letter of the output type: dvi: i, ps: s, pdf: f Non-selected output files will be deleted! Examples: -osf for PS and PDF; -oa for all: DVI, PS and PDF -o must be the last one in grouped short parameters because of its suffixes. You can choose a certain default output type by setting the environment variable MDVI_OUTPUT variable, see "Environment variables". -p Use as papersize. This will be passed to dvips and dvipdfm when PS and PDF output is produced. If this option is not given, mdvi will fall back to the environment variable MDVI_PAPERSIZE, then to the default papersize of dvips, and finally to a4, if none of the above is found at all, see "Environment variables". If you choose a papersize unknown to dvips resp. dvipdfm, mdvi will exit with an error message. Environment variables: mdvi uses the following environment variables: MDVI_MIDI Here you can define a default MIDI instrument set which will be chosen when parameter -m is not used in the command line. MDVI_OUTPUT This must be one of the letters known by the -o parameter which selects the output files produced. This variable will be consulted if parameter -o is not used in the command line. If MDVI_OUTPUT is not set either (or invalid), then i is used. MDVI_PAPERSIZE This should be something like letter or a4. This string is passed to dvips and dvipdfm as paper size when PS and PDF output is produced. If parameter -p is not used and this variable is not set, then mdvi will fall back to the default paper size used by dvips as specified in the config file /etc/texmf/config.ps which will be found in the location as seen above in Redhat and SuSE Linux installations. Finally, if nothing is found there, then a4 is used. Invocation examples: mdvi lechner1. produces lechner1.mid and lechner1.dvi from the source file lechner1.mtx, because the default output type is dvi (controlled by the environment variable MDVI_OUTPUT). mdvi -of -p a4 lechner1 produces lechner1.mid and a DIN A4 sized lechner1.pdf from the source file lechner1.mtx.