LilyPond news

The LilyPond Report #4

Monday 7 April 2008 by Valentin Villenave

This short, informal, weekly opinion column is about the LilyPond project: its team, its world, its community. It is not meant to be an exhaustive documentation resource. Reader comments are, of course, welcome (see at the bottom of this page).

Welcome to this fourth issue of the LilyPond Report!

This week, we are going to mention some recent good and bad news among the Free world, with Microsoft’s OOXML format standardization and Mozilla’s 10th anniversary; we will also have a first look at LilyPond’s support for native PostScript code, and discuss the use of old LilyPond versions. Finally, the LilyPond Report goes multimedia on this issue, thanks to Nicolas Sceaux who provided us with a short but impressive video! As always, you can post your comments at the bottom of the page, or even register and contribute to the LilyPond Report’s next issues.

 This Week’s Desultory Editorial

Yesterday, a student of mine almost blamed me for writing so much stuff in English on my website, while we still lack (do we?) French LilyPond resources. I am obviously not likely to ever translate the LilyPond Report (even Distrowatch Weekly isn’t translated); however, this could be considered if, in a distant future, this column was written by many other LilyPonders and not only by myself. Let me recall this: contributions are always welcome, the LilyPond Report belongs to everyone!

This week, I had a look at the previous issues of the Report, and suddenly realized that in almost every "News from the Free World", I actually give examples… from France! I already mentioned the Framasoft community, as well as the Jamendo music diffusion portal — and yet, I simply couldn’t help mentioning another French website this week (see below). Well, perhaps you might find it interesting anyway.

And now for something completely different.

I remember what a great time I had, as a child, when I discovered the Logo turtle drawing. It was on an old Thomson MO-5 (French schools were full of these back then), with a 16 colors display, but still — it was just great.

This is actually a feeling I kind of rediscovered when I learned about the \postscript feature in LilyPond. At first I didn’t understand what it was about; then I began writing some simple code on the mailing list; then I even saw that it gave me an opportunity to import some drawings made with the (amazing) Inkscape editor.

There’s actually a big difference between PostScript and Logo-turtle graphics. While with the second one, the ending point of every move is taken as the origin point of the following move, PostScript keeps track of the whole coordinates system. For example, if you want to draw an "L" letter with a Logo turtle, you’ll just have to go down for 4 steps, and then left for 2 steps. In PostScript, you’ll have to go down from 0 0 to 0 -4, then start from 0 -4 to 2 -4. Both have advantages and downsides; however the point is: vector graphics are simply cool [1]!

 News from the Free World

Earlier this week, I was tempted to add some funny fake piece of news to my Report as an April fool’s joke; however, I quickly changed my mind when learning about the much unpleasant event that is likely to affect both Free and non-Free world. I am refering, of course, to Microsoft’s OOXML format approval by the ISO… Not a good time to have a laugh indeed.

For the LilyPonders that wouldn’t already know about the topic, let’s just sum it up briefly. As I told you on a previous issue, the "open source" thing has been going mainstream for the past few years. Due to the constant evolution in quality, reliability and independance of Free Software, there’s nothing more fashionable these days than the open marketing concept — what’s being "open"? Nobody could really tell you; let’s just say that "open" is cool, "open" is sexy, "open" means everything that could lead you to buy anything. Therefore Microsoft, a company in decline (at least in terms of brand image), has chosen to name its new document format "Office OpenXML", their way to say "look! we’re not evil".

This format was released almost immediately after OpenOffice’s OpenDocument Format (ODF), and was clearly intended to be an (obfuscated) clone of its competitor. As many people noticed, this format is nowhere near "free" as we understand it; besides, it is obviously defective; these two reasons should prevent anyone reasonable from relying on it on a long-term level.

For these reasons among several others, Microsoft’s campaign to get its format recognized was not likely to succeed. And indeed, it started on the wrong foot… Until the company did what it does best: it cheated.

Without telling you the whole story here, I’ll just mention several links that could help you to know about some strange circumstances that led to OOXML’s approval as a standard by the International Organization for Standardization and by its members.

The first place to look at is, obviously, the official No-OOXML page, where an (impressive) list of irregularities has been established. There are also quite a few articles on Groklaw that confirm these suspicions. You might want to also have a look at the Consortiuminfo blog, that I’ve just discovered, and that’s quite interesting; if you do, please also read Andy Updegrove’s point of view on ODF and OOXML’s future.

As for France’s decision, it was certainly not the less unforeseen of all ; our committee had voted "no" so far, with some very strong comments against Microsoft’s format. On March 25th, they were still strongly opposed to OOXML; however three days later, they changed their vote to "abstain"… which surprised everyone (or, sadly, not). Strangely, even some experts of the committee said they couldn’t remember having voted such a decision; some rumours of corruption (that wouldn’t surprise me at all, in these days) have blamed one of President Sarkozy’s spin-doctors, Franck Suplisson, for having ordered the leaders of the committee to change their mind, as Microsoft desperately tried to lead them to.

Disappointed but not surprised — No matter how it was taken, this decision from the ISO was widely commented and criticized: "it’s a vote that nobody won", "it’s bad for all of us"… Red Hat company spokesperson, in a press release, declared himself

disappointed but hardly surprised that the single-vendor, monopolist-promulgated standard, Office Open XML, made it though an unfortunately flawed fast-track ISO approval process".


On a slightly brighter tune, perhaps you have realized that this week was Mozilla’s 10th anniversary; whether you’re using a Mozilla-based web browser or not, you cannot ignore the huge turning point that this event meant for the Free world.

Each one has his way to celebrate; mine was to pay a visit to Tristan Nitot’s Standblog!

JPEG - 3.5 kb
Tristan Nitot

Wait a minute… doesn’t it ring a bell? Tristan Nitot is actually the chairman of the Mozilla Foundation — Europe, and has been playing a major role (particularly through his blog) in the whole Free World for the past few years. Interestingly, the Standblog his written half in French, half in English; half of the posts are written in English, and the others are in French; so feel free to go have a look by yourself!

To say the least, Tristan Nitot knows about everyone in the Free World. Not only does he give his own thoughts, but he also provides links to many people, places, debates etc. When reading his blog, you can’t help feeling observing the Free world in front row view; this is, among others, how I kept up with the OOXML masquerade.

Let me close this week’s section, precisely, with Tristan Nitot’s own "quote of the day" about the OOXML deal. This quote is taken from Rob Weir’s blog, who noted that

Now that it has been demonstrated that pushing proprietary interfaces, protocols and formats through ISO is cheaper and faster than writing code to implement existing open standards, one assumes that the future is bright for more such boutique standards from Redmond. OpenHTML, anyone?

 What’s up with LilyPond?

Have a look at this table:
results 1-4 2.6 1.9 2.2 2.1
results 5-8 2.8 2.8 2.1 2.8
results 9-12 2.0 2.1 2.6 2.3
results 13-16 2.7 2.7 1.8 2.0
results 17-20 2.6 2.6 2.3 2.2

Sudoku? Not at all. This is actually what Google provided me with when I tried to search for the "slur" word, using the integrated Search function on our home page. As you can see, documentation for older LilyPond versions is actually very much better referenced than new Documentations: on the 20 first results, the 2.10 Documentation is not even appearing!

Recently, several mails on our mailing list made me realize that people are actually using these old versions of LilyPond [2]: this week a new French user named Jean-Marie Labrousse mentioned he was still using 2.8.5, and earlier, Karl Hammar, though he’s familiar with the latest versions, told us he’d rather use 2.6.5, "mostly because my printer does not handle postscript level 3 features which later lilypond uses. Also later versions seems to handle ancient notation worse."

This is something I simply cannot understand. As a genuine geek, I have always been installing latest, bleeding-edge material, and I just feel dishonoured when the Linux kernel I’m running is three weeks old. I’ve been hitting my head against a wall for two years because my girlfriend has kept using MacOS 10.3 while 10.4 and 10.5 were already out, and for a (short) moment I even considered giving Windows Vista a test!

So, what can make you use an old LilyPond version? Is LilyPond "moving too fast", as suggested on the Download page? (Honestly, I’ve always seen that as a purely rhetorical question.) Is it because of your Linux distribution? Is it a matter of taste? I’d be really happy to gather some opinions on this — if I get enough arguments, we’ll get back to this topic on next issues.

 The LilyPond Feature of the Week

If you’re new to LilyPond, you may have wondered why your (hopefully) favourite program keeps producing some strange .ps files, that nothing can read (on Windows), and that are obviously useless. This "ps" extension actually stands for the PostScript language, that was originally developed by Adobe — you know, the guys behind your (not hopefully) favourite PDF reader?

Well, the PDF format is actually the grandchild of PostScript. Just like PostScript, it allows to describe graphics at a resolution-independent level (i.e. if you zoom in a PDF document, say, a LilyPond score, by 500%, you will not see any big ugly square pixel, but nice perfect black curves).

As you may already know, one of LilyPond’s dependencies is GNU Ghostscript. This software is actually what interprets the PostScript code, and converts it in PDF format (otherwise, we would have to use Adobe’s original interpreter, and LilyPond would suddenly become as expensive as your (favourite) commercial music software).

So, what does PostScript code look like? You might try to open a LilyPond .ps file in a text editor, but this will very much look like a nightmare, since a huge amount of data is actually included in it (music fonts, etc.). Let’s take another approach: LilyPond actually makes possible to write native PostScript code in your scores!

First open a \markup block, then simply type the \postscript command. This command needs a text string that Scheme can understand, so remember to add a hash before the double quotes:
\markup {  \postscript #" code goes here " }

OK. One thing to remember is that in PostScript languages, arguments always come before the operators. For instance, the following command will set the thickness of your "pencil":

0.3 setlinewidth

Next, let’s try some basic commands. moveto simply moves your pen without drawing anything, while lineto draws a line (remember the turtle?):

-1 0 moveto
-1 1 lineto
1 0 moveto
1 1 lineto
stroke

The stroke command is what will actually draw the two lines, so don’t forget to add it.

OK, let’s add a semi-circle now. We have to specify the coordinates of the center, then the point where the pen has to be moved to begin drawing a circle (counter-clockwise), and then the actual starting and ending points of the arc on this circle. In this case, we want our circle to be centered at the origin (0 0), we want to start drawing the arc on the left (-2), to start right at the same eight than the origin (0), and to stop after having drawn a 180° arc (180).

0 0 2 180 0 arc
stroke

Finally, we’ll draw a full circle around the whole thing, using a different approach this time: we’ll just start an arc (1° is even enough), and let PostScript close it for us. Therefore, we will enclose our new arc between newpath and closepath.

newpath
 0 0 4 1 0 arc
closepath
stroke

And here we are:

\markup {
 \postscript #"
   0.3 setlinewidth
   -1 0 moveto
   -1 1 lineto
    1 0 moveto
    1 1 lineto
 stroke
   0 0 -2 0 180 arc
 stroke
   newpath
     0 0 4 1 0 arc
   closepath
 stroke"
}

Of course, this is just an introduction (I would not be able to go any further myself). However, I hope this will awaken your curiosity and desire to experiment. I spent ours playing with PostScript code, just like when I was a child; once again, this is really cool.

UPDATE: Karl Hammar posted this link to the "Blue Book", the "classic tutorial to postscript". Thanks Karl!

The only unanswered question remaining: why the hell would anyone need to print smiley faces on a music score?

PNG - 3.4 kb
Happy to play — a new pedagogical method
Based on subliminal messages and autosuggestion, this revolutionary method will make a piano teacher’s life considerably easier.

 The Snippet of the Week

I did say "really cool", didn’t I? Well, last week I told you about absolutely useless tags in the LSR; the "really cool" tag is one of them. This is a tag I proposed to add, just for fun, and because this is how I see LilyPond: a really, really cool application. And if you doubt that, just have a look at the "really cool"-tagged snippet list to get convinced.

Reinhold’s glasses
This week I noticed some interesting modifications to the LilyPond musicxml2ly script; paricularly a bunch of PostScript code that looked great. After having tried to add this to the LSR, I discovered that Reinhold Kainhofer had already done so. Let me introduce you to… Reinhold’s eyeglasses!

To insert eyeglasses into a score (strongly indicating that one should look at the conductor), one has to insert self-defined postscript code as a markup.

I didn’t think this would be ever be implemented in mainstream LilyPond; however Werner Lemberg asked very seriously if Reinhold wanted him to write a dedicated font glyph. Reinhold’s answer took me back, once again, to my school years (perhaps you too remember some teachers asking you how you would draw a house, a cloud, a pair of glasses using geometric shapes):

The eyeglasses are just two circles, one half-circle (the bridge, shifted a bit upwards), and a line plus a Bezier spline for each of the temples.

— Though admittedly, none ever asked me to draw a "Bezier spline" at school. :-)

 LilyPond’s Companion Projects

This week, Karl Hammar shared with us a rather unusual set of macros [3] that somehow replace lilypond-book with some gcc makefiles.

I dont use lilypond-book directly in this project.

Instead I have tried to let the makefile handle the ly -> eps conversion, which works great if you \include "eps.ly" in your 2.6.5 sources, for 2.10/2.11 use \include "lilypond-book-preamble.ly" (for 2.11 run lilypond with lilypond —ps -dbackend=eps file.ly). Basically this include crops the eps to get rid of extra white borders.

Moreover, Karl made me discover this beautiful free font, that is released under a Have a blast with it. If you use it commercially, give something to your favourite charity, will ya?-license. Thanks!

Another interesting piece of news: do you remember the French mailing list I talked about last week with John Mandereau? Well, a few days later I was proved that interesting things also happened there: Nicolas Sceaux shared with us an impressive video demonstrating the LilyPond-quick-insert mode he wrote for the GNU Emacs editor.

Have a look at it below, or click here to play the video in .avi format.

Flash Video - 1.6 Mb
LilyPond quick insert mode demonstration
Many thanks to Nicolas Sceaux.

Impressive, isn’t it? What’s even more impressive is the huge list of scores typeset by Nicolas, to be seen on his blog. Most of these scores are from baroque French composers (Lully, Rameau, Couperin) that otherwise would be very hardly published nowadays, and probably in very expensive editions. So, many thanks to Nicolas! As I asked him if he wouldn’t rather put his face on the video, he replied:

In your dreams :-) An unshaved geek with glasses, not comfortable talking, and in the background some maps of the Gondor and the Númenor, with the locations depicted in Elvish Runes — that would be too much of a cliché :-)

Umm, that is clearly as descriptive as a video footage… Consider yourself on tape, Nicolas! :-D

On next week’s issue, we’ll present another video, demonstrating some features of the LilyPondTool environment; Francisco Vila will be our special guest. Stay tuned!

And this concludes the fourth issue of The LilyPond Report.

Cheers,
Valentin Villenave

[1] By the way, I strongly believe that at some point we will all use fully-vectorized, resolution-independant graphical interfaces — GnuStep potentially has it, GTK and Qt are getting ready, and Apple has already patented some concepts behind it. Let’s take a bet!

[2] Agreed, we have always branded the stable version as "safer" than the development version, and therefore we use to put 2.10 above 2.11 in both the Documentation and the Download page (interestingly, that’s not the policy of such projects as jEdit.org, were the development version is branded as "latest version" and placed above the "stable version")

[3] After having read this sentence, Karl answered on the mailing list: "Hmm, I don’t see them as unusual, I see it more like that I bend lilypond-book to the way I am used to when developing program and using latex" — Follow the link for detailed explanations!


Forum

Home page | Contact | Site Map | | Statistics | visits: 73311

Follow-up of the site's activity en  Follow-up of the site's activity LilyPond Report   ?

Site created with SPIP 2.0.6 + AHUNTSIC

Creative Commons License