|
|||||||
How to set up the abc*2ps abc package on Windows© Steve Mansfield, Manchester, England Last revised 18 November 2006 IntroductionThis page is not a tutorial on abcm2ps itself. Have a look at the readme or readme.text file that comes with your copy of abcm2ps to see all the options available to you. This page aims to show how to set up the abcm2ps package for use on Windows: I wrote the original version of this page for a post to the abcusers mailing list, and have expanded that original post to make it (hopefully) clearer. For further information on the abc music notation system you can use the following links to my abc notation tutorial and to the abc home page. These instructions should hold true for all of the various versions of abc2ps that are available on the web. For ease of reading I shall henceforth always refer to abcm2ps, as that is, at the time of writing, probably the best version of abc2ps available as a pre-compiled Windows executable - however, for abcm2ps, simply substitute whichever version and filename you have got. These instructions should also be valid for any current and past version of Windows, from 3.1 up to XP and no doubt beyond. This is a bit of a long-winded process to set up, but you'll only need to do this the once, and the results are well worth the effort! I'd also suggest that you might want to print these instructions out rather than refer to them on-screen. What is abcm2ps and how do I get it?abcm2ps is not a combined abc editor and score viewer (like, for example, abc2Win or Muse are): it is, rather, an abc processor, eg it takes existing abc files and (amongst other useful things) produces Postscript output of conventional notation. It is open-source software, so various programmers have taken the original abc2ps source code and made modifications to suit their particular needs and ideas. abcm2ps is by Jean-François Moine, and is based on abc2ps, which was written by Michael Methfessel. If you've not already done so you can get more information about abcm2ps, and a ready-compiled Windows executable, by clicking on this link to the abcplus Sourceforge project. The abcm2ps home page, with source code for both stable and development versions, is at http://moinejf.free.fr/. The home page for abc2ps is to be found at http://www.ihp-ffo.de/~msm/. Links to other versions of abc2ps can be found on the above pages and through the abc home page. InstructionsSo, first write your abc file in your text editor of preference. I use TextPad http://www.textpad.com, there are other equally good text processors available, but even NotePad will do the job OK-ish. Save your file with an .abc extension (minding, as you do, NotePad's irritating propensity to save files as filename.abc.txt unless you use the All Files option in Save). Now you want to feed that file to abcm2ps - and the best way to do this regularly is through a batch file or macro. (If you are new to the idea of Windows batch files, click here). The relevant line in my batch file is c:\progra~1\abc2ps\abcm2ps %1 -O d:\temp\Out.ps >> c:\temp\abc2psLog.txt To go through that step by step: c:\progra~1\abc2ps\abcm2ps is where the abcm2ps executable resides, %1 is the batch file parameter, which is replaced by the abc file at runtime, -O outputs a PostScript file, d:\temp\Out.ps is the PostScript file which is created, and >> c:\temp\abc2psLog.txt captures the abcm2ps log messages to a log file in my temp directory. This last stage is entirely optional, but means that you can look at any error messages that might otherwise have scrolled off the top of the screen. You can do all sorts of other stuff like only choosing certain tunes from the file, or sending very precise layout options, or produce an index - check the many options for details. To do that read the readme file or just type abcm2ps at the command line in the relevant directory, and have a good read of the available options. OK, so now you've got your Postscript file. If your printer speaks PostScript, and you're only ever going to want to print stuff out to paper, print that Postscript file and you're done. If, however, you'd like to see the results on-screen (like you can in abc2Win) before they print, or just want to see the tunes on-screen and save a forest, and have various other control over the printout, you need GhostScript, which is a GPL implementation of Postscript, and GsView, two linked programs that you can get from various magazine cover disks or by clicking on this link. Install Ghostscript (the scriting language itself) and GSView (The graphical interface) and add another line to your batch file, feeding the .ps file to GSView - mine is c:\gstools\gsview\gsview32.exe d:\temp\Out.ps then when you run your batch file against your abc file, your abc will be converted into PostScript and displayed on-screen for proof-reading or printing (you can print from GSView). One of the reasons I use Textpad for all my text-file work is that TextPad
allows you to set up macros to external programs. I've got Macro 1 set up so
that the file currently on-screen is fed to my abcm2ps batch file, so all I
have to do to process the file in abcm2ps and display the results in GSView
is hit <ctl><1>. Other Windows text editors allow similar functionality
of course. LinksAll these links are duplicates of links in the main text - I just thought it would be useful to also have them all in one place ... Ghostscript and GSView) The ABC Plus project, and the abcm2ps binaries abcm2ps home page (Jean-François Moine) abc2ps home page (Michael Methfessel) My abc tutorial The abc home page Windows batch filesBatch files are simply plain text files that contain one or more instructions to run programmes, or carry out some other function on your computer. To create a batch file simply type your commands and save the file with a .bat extension. You can then double-click on the batch file, or set up a shortcut to it and click that, and your batch file will run. A simple batch file would be a single command such as dir (which lists the file names in the directory you run the batch file in). So if you
you would get a list of the files in that directory. The batch file we are discussing here has two main lines, eg c:\progra~1\abc2ps\abcm2ps %1 -O d:\temp\Out.ps >> c:\temp\abc2psLog.txt c:\gstools\gsview\gsview32.exe d:\temp\Out.ps This adds the extra complication of giving the batch file the abc file name. Assuming you've got a batch file called batchfile.bat, and an abc file called tune.abc, this is simply a matter of opening a command prompt window at the relevant directory and typing batchfile tune.abc and your tune will display in GSView in all its glory. Any further tuition on batch files, such as setting them up, using them on your particular version of Windows (the command prompt is not immediately available on Windows ME for example), etc. is well beyond the scope of this current tutorial - but if you go to Google and search for batch file, there are loads of excellent resources available (if anyone knows of or comes across a particularly good one, email me and I'll put a link in here). back to the link to this section in the main text |
|||||||