Music Publishing in LINUX

by Laura Conrad


The Talk
The Questions
The Summary

Why?

I started wanting to publish music because I was playing Renaissance Polyphony, and the available modern editions had serious deficiencies, and I thought I could do better.

In general, music applications in LINUX are not yet at the standard of the best commercial applications available for mass-market OS's.

One exception to this is special-purpose music publishing, which builds on the publishing work which has been done in the UNIX world over the last three decades by the people who have developed TeX.

If you don't need large amounts of control over your output, and are a good enough player to do note entry via MIDI, and don't need any special features, there are lots of programs, both commercial and free, that you can use, and you can probably find one on whatever OS you decide on.

However, if you're putting the work into publishing because the available printed music isn't what you want, you may well find that you need more features or more control over the output than these programs give you.

For instance, one early music friend has been transcribing the music of sixteenth century microtonal composers using ABC. She describes what she's doing here.

How?

As with other music applications, the place to start looking is with Sound & MIDI Software For Linux, which is a pretty comprehensive list of what's available.

I played with a number of things on that list, and settled on ABC, using abc2ps for printing, and abc2midi for proofreading. You can see the results here (ed note 2005: now using Lilypond)

One major advantage of ABC over other possibilities is that it's easily typed: I can enter the data via (almost) touch typing. The conversion to MIDI is quite good. In the past, using MIDI for proofreading has been somewhat clumsy as compared to GUI WYSIWYG programs, since I didn't have an automated way to stop the playback on an error and be left in an editor at the corresponding place in the ABC.

This may change with the advent of tclabc. At the moment, I can't really use it -- it doesn't recognize w: fields, and doesn't obey the %%MIDI directives I use to enble abc2midi to produce MIDI output I can listen to. But it's certainly a step in the right direction. Another hopeful sign in the release of Jazz++ under the GPL.

Another problem with this system is that ABC doesn't (yet) support a lot of the music notation that would be useful for what I'm doing. (C clefs, longa and breve notes, incipits…) I'm expecting my next project to use a translator from ABC to one of the less typeable but notationally more complete formats. abc2ly translates abc directly to lilypond, and lilypond 1.2.17 seems to have most of what I need. Another possibility is using Rosegarden to translate the MIDI into pmx, which eventually produces MusiXTeX.

Other Resources

Mailing lists

Music publishing programs in the UNIX tradition are not always well-documented, and even if the music part of the program is, you are likely to be depending on complexities of underlying software like ghostscript and TeX. So it's likely that you will need some help getting started, or when you try new things. Most programs have mailing lists. The major reason I ended up using ABC was probably how friendly and interested the people on the abcusers mailing list were. The lilypond and musixTeX mailing lists are also quite good.

Example code

An advantage of a text-based music publishing system is that it's easy to see what someone actually did to put the music in. All these programs have websites with lots of examples.

OK, I have a transcription, what do I do with it?

Of course, the first answer is to play it yourself, or with other people. You will be surprised at how many ideas for how to improve it will come out of this process.

Put it on the web

I put things up on the web as soon as I have something that sounds like I think it should in MIDI, and doesn't have obvious problems that jump out to the naked eye.

In other words, much of the stuff on my website still needs a lot of serious proofreading. I used to feel guilty about that, but since then, I've gotten really serious proofreading help from a couple of people who stumbled across my site. I have concluded that this is one of the things the internet is for.

The things I just throw up are in ABC source, MIDI, and PDF. I'm always surprised at how many people actually download and play the MIDI, which for me is just a proofreading device, but they do seem to like having it. I originally thought it would be useful for people who wanted to use some other kind of publishing software. I don't know of anyone that's been successful at doing that; some people have tried and had problems.

I originally put up postscript, but I found that there were a lot of people who could read pdf and couldn't read postscript, and now that ghostscript handles pdf, there aren't many people who can read postscript and can't read PDF. So I convert my postscript output from abc2ps to pdf by saying:


ps2pdf <postscript-filename> <pdf-filename>


I also have scripts that zip all the MIDI and all the ABC into one zip file. I originally was putting all the pdf into one file, too, but that one got too big to be practical.

"Publish" in hardcopy

To appreciate what I'm talking about in this section, you should look at the Canzonets for two voyces page and compare that with the stuff on the music publishing page.

It's a longer distance from having the transcriptions to having a printed "book" than I would have expected. Not only do you have to really proofread, you have to make sure that every page (even if xeroxed out of context) will have all the necessary information. In my case, this meant using TeX to put headers and footers in, and having abc2ps produce .eps files instead of postscript.

If you want the details for how this works, all the sources (TeX, and eps) are here.


Laura Conrad

The Questions

> What software should we gather to do the
> job?

A recent ghostscript. (6.01 is current)

Tetex. (The one that shipped with Redhat 6.0 has a terrible bug in the hyphenation algorithm, and should be upgraded.)

Browse the music notation section at sound.condorow.net, and possibly also the MIDI playing section.

The ones I currently use are:
lilypond (1.4.8) via abc2ly

timidity

I have experimented with both PMX (a preprocessor to MusiXTeX) and lilypond. I find PMX/MusiXTeX difficult to install, and lilypond too unstable for use on real projects.

Here's an update (Oct 01) regarding PMX... Second, I'd just like to mention that while PMX doesn't have MIDI input or WYSIWYG, it does have a simple text-based input language and can directly produce a MIDI output file for proof-listening. It can be downloaded as a linux rpm, generic unix makefile, or FORTRAN source. It comes with complete documentation. It does not require Rosegarden as a front end, as some people might infer from your text. Of course it does require MusiXTeX and TeX to be installed. And for vocal music, there is a pre-pre-processor M-Tx. --Don Simons

The disadvantage of abc2ps for a major project is that it's essentially orphaned. It's had very heavy use, so it may not have a problem for your idea, but if it does, you might have to fix it yourself. So I'm experimenting with replacing it even for ABC output with either:

abctab2ps, which is currently in beta or alpha and not yet listed on the right web pages, but can be downloaded here

YAPS, which is part of the current abcMIDI distribution.

> OK, so this system of publishing is going to be based on
> producing MIDI files and then turning that into scores?

No, you use abc2ps (or possibly yaps or abctab2ps) to print the scores, but you use the same abc input to abc2midi to play them for proofreading.

> What do we do next?

Well, you have to test that your printer prints postscript and your MIDI player plays MIDI. One way to do that is to go to the abcMIDI source directory. There is a file there called demo.abc. Say:
abc2ps demo.abc -O = -o

You should now have a file demo.ps. Make sure you can say:


gv demo.ps

if you are in X windows. And either from gv or the command line, you should be able to print demo.ps on your printer.

If you say:
abc2midi demo.abc

You should end up with demo[1-6].mid, and you should be able to say:
timidity demo1.mid

and hear the "Horse's Bransle" play.

Then you have to learn to write the ABC for your own idea.

There is documentation that comes with those programs; there's also a tutorial here, as well as the description of the standard on the ABC main page.

> I'm confused here - once we get some software together what's the
> starting point of getting the musical idea into print? ABC?

ABC is the input. Unless you already have a MIDI file, or like doing data entry by means of a MIDI, in which case you can try using MIDI as the input and one of the abcMIDI programs called midi2abc to turn it into ABC. But I haven't had a lot of luck doing it that way. YMMV.

The advantage of ABC as an input language is that if you're a touch typist you can type it in almost at real speed. (for one voice.)

> Ah OK, there are a number of choices for producing midi
> files including rosegarden, jazz++, and Melys. Have you used
> anything in particular?

Rosegarden works and jazz doesn't in my setup, but I don't really use either of them. I do the data entry by typing the ABC. I don't see anything in LINUX as being as good even as Cakewalk, and I think there are serious problems with doing that kind of data entry in Cakewalk. Or at least the version from 1993 or so that I've used. I hear good things about the equivalent in Finale, but I've never used Finale.

> If someone doesn't have MIDI keyboards for entry of the notes
> they'll be faced with the choice of hand entering the notes
> (on a piano roll in jazz++ or into staves in rosegarden) or
> hand entering into ABC. Which do you like?

Hand entering in ABC is easier than hand entering in anything else I've used. That's essentially why I use it. I keep thinking of replacing the actual printing part with something that gives you more control of the output than abc2ps does, but I don't see learning to type the other formats, or getting my keyboard skills good enough to do real-time MIDI entry.

> Is ABC a matter of entering a series of tags (kind of like
> HTML) to indicate what notes what? Is there a GUI tool?

There's a start on a GUI tool, tclabc, which I can't use yet, but people think it has potential.

> Would you like to tell us more about what exactly ABC does?

ABC is a language for describing music in terms of ASCII text. There are programs that can turn ABC input into typeset sheet music, or MIDI. There are also people who read it as is. One of the most useful aspects of having an ASCII description is that you can just email it to a friend who can read it, or has a program that can deal with it. abc2ps and abc2midi, two of the programs I recommended above, compile out-of-the-box on most flavors of UNIX, and have been ported to both Windows and MacOS, so you really can share your music with most of your computer-owning friends.

For instance, I needed an arrangement of an English Country Dance tune for my recorder trio to play, and I started writing one, and emailed it to a friend in Norway, who helped me finish it.

And here it is, an example of abc ...


X:1
T:Knives and Forks
C: Arr. Laura Conrad and Frank Nordberg
S: 1726
%%MIDI gchordoff
M:3/2
K:G
L:1/8
V:1 name=S
|:"G"g2 ag "D"f2  gf "C"efge | "D"f2 d4 f2 e2 d2 | "C"c2 dc 
"G"B2 cB "D"ABcd | "G"B2 G4 B2 A2 G2 :|
|:"G"GABc d2 G2 F4 | "Am"E2 A4 G2 "D"F2 ED | "G"GABc d2 g2 
"D"F4 | "G" D2 G4 B2 A2 G2 :|
V:2 name=A
K:G
L:1/8
|:B4 A2BA GABc|dcBA GFGA G2F2|E4G2AG F2GF|G2D2 B,2D2- DFGA :|
|:BAGA B4- Bcd2|c8 d2cB|BAGA G2E2 D4|D2EC B,2D2 C2B,2:|
V:3 name=T
K:G 
%%MIDI transpose -12
M:3/2
L:1/2
|: G d  c | d A d   | c d A | g B D :|
|: G d c   | A c d  | B B/ c/  d | B D G :|

> right ... that's interesting. I think I was expecting something
> more TeX-like.

Another thing:

There's an index of all the ABC that John Chambers (jc@trillian.mit.edu) knows about. So if you need an arrangement of a piece, and someone has already been nice enough to make one and put it up on the web, it's likely you'll be able to find it and use it by using the tune search program. And a list is here.

Historically, ABC was a preprocessor for MusiXTeX, which is as TeX-like as they come. But it was hard to type and edit.

> In the absence of tclabc doing the full thing, are there any GUI
> tools for getting from music to score?

Rosegarden seems to do pretty well with notes. It doesn't deal with words very well. They're working on GUI front ends to both lilypond and MusiXTeX; I don't know how far along they are.

ABC has well-supported GUI's for both Windows and MacOS. The Mac one doesn't produce postscript, though, so if you need postscript, you run it's ABC through the Mac version of abc2ps.

> What does lilypond do?

Lilypond is a processor for a music description language called mudela. It can produce either TeX (not the same macros as MusiXTeX) or MIDI. There's a wrapper script called ly2dvi which automates getting through the TeX intermediate file. There's also a program called mudela-book which allows you to use your lilypond-produced TeX in the context of a LaTeX document.

Mudela isn't easy to type, but there are scripts to produce it from either MIDI or ABC.

If it worked, this is the right kind of design for what I want to do, and I would be using it. Unfortunately, it's not only buggy, but the mudela language is in development, and there's no guarantee that the mudela you wrote last month will work with this month's Lilypond (which you may well need because of a bug in last month's Lilypond). So I play with it sometimes (via abc2ly), but don't consider it suitable for real work.

The Summary

If you're starting with an idea ... and you have good music keyboard skills and a MIDI keyboard; you can enter the musical idea into a sequencer such as rosegarden, melys (ALSA), or jazz++ and then convert the MIDI file to abc using midi2abc (which might or might not do a good job) if you don't have a MIDI keyboard; You have the choice of data entry into a musical stave (rosegarden), piano roll (jazz++ and melys) or learning ABC or maybe Lilypond. Because of possible difficulties with the conversion software (from MIDI) you will have more control using ABC or Lilypond. Another choice as of Jul 00 is to use software keyboards (use mouse or computer keyboards) to input data to the sequencer. You need ALSA for this. A howto is
here. Have a look at the software keyboards mini-howto. It might make your options more open. if your idea is really unusual and demands very creative notation (a la some of Stockhausen, Xenakis etc) You might be better using a graphics tool and publishing from there. Once you get to the xxx.abc stage the flow is: convert to postscript (abc2ps) test the file with ghostview if you haven't made a MIDI file, maybe make one and listen (abc2midi and the sequencer/player of your choice) Editor's note July 00: Laura recieved an email from the makers of Mup saying that their shareware program will do some of the things mentioned above. It uses a text file or MIDI input to create nice looking postscript pages. You can check it out at www.arkkra.com. It's available for a variety of platforms including Linux. Another app is noteedit which has a v nice looking screenshot and will import and export MIDI and export musicTeX. This is a GPL program and ... it's GUI based.
 home  music  news  opinion  software  tips  email