Installing and running Mup on MS-DOS

The easiest way to use Mup on a Windows machine is to run Mupmate. However, this web page describes two ways you can run Mup without using Mupmate. Both of these ways involving using MS-DOS.

A little background

For those unfamiliar with MS-DOS, here are a couple things you may need to know.

In Windows, there is a type of window you can open called an "MS-DOS Prompt" window or a "Command Prompt" window. They are the same thing; what it is called depends on which version of Windows you have. We will refer to it as an "MS-DOS Prompt" window.

Here is how to open an "MS-DOS Prompt" window. You may have a shortcut icon called "MS-DOS Prompt" or "Command Prompt". Or, in the Start menu under Programs, you may have "MS-DOS Prompt" or "Command Prompt". If you don't have it in those places, go to the Start menu, then to Run, and tell it to run this:

	c:\windows\command.com
In this window you can type commands. After typing a command you always have to hit the "Enter" or "Return" key to make the computer run the command. You can repeat a command by hitting the up arrow key and then "Enter".

"Folder" and "directory" are also two different words for the same thing. From Windows, you are more likely to be familiar with the term "folder", so we will use that. In an MS-DOS Prompt window, you are always "in" some folder. In the lower left of the window, it shows you what folder you are now in. (That is called a "prompt", because it is prompting you to type the next command you want it to do.) The folder name is followed by a ">", so if you are in a folder called c:\mup you will see

	C:\MUP>

Some versions of MS-DOS restrict file names to eight characters plus an extension (which is a dot and up to three characters). Also, it may have problems with special characters, such as blanks and punctuation. So when you make file names for the music you write, you may find you need to follow these restrictions.

First method: running Mup directly from the command line

If you don't want to use Mupmate, we recommend this method for using Mup.

Installing

For this method, just as for the Mupmate method, you need to have program(s) such as GSview/Ghostscript for displaying the results of Mup. If you don't already have them, install them as described in Step 1 on our web page called "obtaining a copy of Mup". And you also need to install Mup and Mupmate as described in Step 2 on that page, although you won't actually be using Mupmate.

The Mupmate/Mup installer tells you what folder it will install them in, or you can tell it to use a different folder. The following examples assume the folder c:\mup, but you can choose a different name, or just let it use the default. You also need to decide what folder you want to use to hold the Mup input files of music that you will be writing. In our examples we'll call it c:\songs. You can create that folder by using Windows Explorer. Or you can do it from an MS-DOS Prompt window, by typing the command

	mkdir c:\songs

Running Mup for the first time

Open an MS-DOS Prompt window. In it, type these lines:

	cd c:\songs
	copy \mup\mup.exe
	copy \mup\sample.mup
	mup sample
You are going to the songs folder, then copying the Mup program (mup.exe) and our sample Mup input file called sample.mup into the songs folder, and then running Mup on that file. (Note: If a folder name has spaces in it, you may have to put quotation marks around that path name. For example, if you are using c:\Program Files (x86)\mupmate instead of c:\mup, you may have to type
	copy "\Program Files (x86)\mupmate\mup.exe"
for the second line above.) When you run Mup on the sample file, you should see over a thousand lines of text fly by your screen. Or you can type this
	mup /F sample
Notice that is a capital F. This sends that output into the file c:\songs\sample.ps instead of letting it go to your screen. (A couple of copyright lines still will come to your screen.) The output that went into the file is PostScript code, and that is what will be used later to actually display the music.

Running Mup from now on

You create the Mup input file for a piece of music (the .mup file) by using an editor such as Notepad (not a word processor like Microsoft Word). The file name doesn't have to end with ".mup", but we suggest that you name it that way, to help keep straight what files are what. And when the name ends with ".mup", you don't have to type that extension when running Mup.

If you use Notepad, be aware that Notepad may add ".txt" to the end of the file name, resulting in a name ending in ".mup.txt". To prevent that from happening, at the bottom of its "Save" or "Save As" box, set the file type to "All files". You also need to set "All files" to get it to list the .mup files when you want to open a file.

The User's Guide has a section about Mup command line arguments. Those arguments can be stated on the Mup command line, right after the name of the command "mup" (separated by spaces between each argument).

Displaying music on your screen:

Since you have already copied sample.mup into your c:\songs folder, let's use that as an example. In an MS-DOS Prompt window, type these lines:

	cd c:\songs
	mup /F sample
Notice that is a capital F. This puts the output of Mup into a file c:\songs\sample.ps. Now run GSview, and click File and Open, opening the file c:\songs\sample.ps. It will display the music.

Now, in your editor (Notepad or whatever), make a Mup input file of your own, and save it in a file, say mysong.mup, in c:\songs. You could use a simple example from the User's Guide, such as the two-line file

	1: 4e; 4d; 2c;
	bar
Then, in the MS-DOS Prompt window, type
	mup /F mysong
which puts the output into mysong.ps. In GSview, click File and Open, opening c:\songs\mysong.ps to see the music displayed.

Printing music on your printer:

To print music, if you have a PostScript printer (which you probably don't), you can send the output of Mup directly to your printer, or save it in a file called mysong.ps by typing

	mup /F mysong
and printing the file mysong.ps. But don't try that unless you are sure you have a PostScript printer. A non-PostScript printer would print that file literally, which will give you dozens of pages of PostScript commands instead of music graphics.

If you don't have a PostScript printer, you can print the music from GSview. After you have displayed the music there, click File and Print.

Playing music on your speakers:

To play the music on your speakers via MIDI, in your MS-DOS Prompt window type

	mup /M mysong
Notice that is a capital M. This creates a file called mysong.mid, which is a MIDI file, in this folder. You play the ".mid" file with a program such as Windows' "media player". You may have a shortcut icon for the media player, or you may find it under Programs>Accessories>Entertainment. Its file name is mplayer.exe or wmplayer.exe, and it is probably located somewhere like c:\Program Files\Windows Media Player. or c:\Program Files (x86)\Windows Media Player.

Second method: running Mup via Mupdisp

We don't recommend using this method anymore. But it's still available, in case you want to use Ghostscript but not GSview.

Installing

For this method, just as for the other methods, you need to install Mup and Mupmate as described in Step 2 on our web page called "obtaining a copy of Mup", although you won't actually be using Mupmate. But you can't use the same Ghostscript as the other methods. You need the MS-DOS version of Ghostscript.

The Mupmate/Mup installer tells you what folder it will install them in, or you can tell it to use a different folder. The following examples assume the folder c:\mup, but you choose a different name, or just let it use the default. You also need to decide what folder you want to use to hold the Mup input files of music that you will be writing. In our examples we'll call it c:\songs.

Basic installation of the MS-DOS Ghostscript files:

The latest MS-DOS version of Ghostscript is version 5.10, and one place you can get it from is http://www.cs.wisc.edu/~ghost/doc/AFPL/get510.htm. You will need the three files gs510ini.zip, gs510dos.zip, and gs510fn1.zip. We suggest you install this MS-DOS Ghostscript in a folder called c:\gs. (You can use a different name, but the following examples assume c:\gs.) Create the folder, and if the three files aren't already in c:\gs, copy them there. They are not self extracting zip files; they are normal zip files, so you will have to unzip them by using a Windows unzipping program, or by typing these lines in the MS-DOS Prompt window:

	cd c:\gs
	pkunzip -d gs510ini.zip
	pkunzip -d gs510dos.zip
	pkunzip -d gs510fn1.zip
or similarly if you are using "unzip" or a form of "pkzip" instead of "pkunzip". If you get a message saying "bad command or file name", or "not recognizable as an operable program or batch file", it means that your system can't find pkunzip (or whichever), so you'll have to do it a different way.

Copy the file gs386.exe from c:\gs to c:\songs.

Changes possibly needed for older versions of Windows:

In older versions of Windows you may need to make changes to the files c:\autoexec.bat and/or c:\config.sys. We suggest you first try running without these changes, but if there is a problem, then your version apparently needs it, so you can then make the changes. One typical error you might see is "ghostscript error 1" when you try to view music.

When changing or creating these files, you must use a text editor, such as Notepad, not a word processor such as Microsoft Word. You will probably find Notepad under Programs/Accessories. You need to reboot the computer for these changes to take effect.

In either c:\gs or in a folder underneath it, you should see some file names ending with the extension ".gsf", and file names starting with "gs_" and ending with the extension ".ps". In c:\autoexec.bat there may need to be a line that sets the GS_LIB environment variable to the folder where those files are. What this means is, somewhere in the file (it doesn't matter where) you would need to put a line that says

	set gs_lib=c:\gs
if the files are right in c:\gs, or
	set gs_lib=c:\gs\XXXXX
if they are in folder c:\gs\XXXXX. If c:\autoexec.bat doesn't already exist, you would create it and put the line in it.

Also, c:\config.sys may need to contain a line of the form

	files=N
where N is greater than or equal to 9. If c:\config.sys doesn't already exist, you would create it and put the line in it.

Changes needed for printing music:

If you have a PostScript printer, you can send the output of Mup directly to the printer, and you don't need to set up mupprnt.bat as described below; but most likely you don't have a PostScript printer.

Edit the c:\mup\mupprnt.bat file to customize it for your printer type. Find the line starting with "GS386", and find the place where it says

	-sDEVICE=printertype
Replace "printertype" with the name for your printer. Comments near the top of mupprnt.bat give the list of printer types that Ghostscript supports. (Different versions of Ghostscript may support more or fewer printers. If you have problems, consult your Ghostscript documentation.) Also edit the mupprnt.bat file so that it can find Mup and Ghostscript, as follows. Find the line starting with "MUP", and change "MUP" to "c:\songs\MUP". Find the line starting with "GS386", and change "GS386" to "c:\songs\GS386". Finally, copy c:\mup\mupprnt.bat to c:\songs.

Running Mup for the first time

To run Mup for the first time, follow the instructions for doing this above, in the section for the first method. However, you need to copy two additional files:

	cd c:\songs
	copy \mup\mupdisp.exe
	copy \mup\mupprnt.bat

Running Mup from now on

Just as in the first method, you create the Mup input file for a piece of music by using an editor such as Notepad (not a word processor like Microsoft Word). See the explanation there.

Displaying music on your screen:

Since you have already copied sample.mup into your c:\songs folder, let's use that as an example. In an MS-DOS Prompt window, type these lines:

	cd c:\songs
	mupdisp sample
The Mupdisp command runs Mup and Ghostscript for you. If there are errors in the file, it will show them on your screen, telling which lines of the file were incorrect. But if there were no errors, Mupdisp will temporarily take over your whole screen, showing you the first page of music. The User's Guide tells you how to move around in Mupdisp; or you can type h or ? to get a help screen. To get out of it, type the letter "q". Your screen will return to normal.

Now, in your editor (Notepad or whatever), make a Mup input file of your own, and save it in a file, say mysong.mup, in c:\songs. You could use a simple example from the User's Guide, such as the two-line file

	1: 4e; 4d; 2c;
	bar
Then, in the MS-DOS Prompt window, type
	mupdisp mysong
again to see the music displayed.

Printing music on your printer:

To print music, if you have a PostScript printer (which you probably don't), you can send the output of Mup directly to your printer, or save it in a file called mysong.ps by typing

	mup /F mysong
and printing the file mysong.ps. But don't try that unless you are sure you have a PostScript printer. A non-PostScript printer would print that file literally, which will give you dozens of pages of PostScript commands instead of music graphics.

If you don't have a PostScript printer, in your MS-DOS Prompt window type

	mupprnt mysong

Playing music on your speakers:

This is the same as in the first method.


If you have problems, you may contact us at

support@arkkra.com


Arkkra Enterprises