Easy LilyPond, a tribute to LilyPond and LilyPondTool
First of all, I’d like to say that LilyPond is easy. A few months after having touched a computer keyboard for the first time in her life, my grandmother is able to use it already.
So my point is in no way to proudly reinvent the wheel, go « Thanks to me, LilyPond is finally made easy » and all that.
Several years ago, the LilyPond team has done an amazing job by getting rid of cygwin, building a cool installer with icons, shell integration and stuff. However, users get easily scared as soon as they no longer see their usual eye-candy windows, menus, pointers etc. Plus, user-friendly tools such as Bertalan Fodor’s excellent LilyPondTool are not easy to find.
Some time ago, a quite interesting discussion made Bertalan think about packaging his great LilyPondTool Plugin together with a Java Runtime Environment and a jEdit ready-to-use installation.
Basically, I felt like trying to add LilyPond as well in the same bundle, plus a few extra options, so that standard Windows users can have only one application to install. I had a look at the LilyPond installation sources (in the GUB repository), and felt like learning the NSIS language to see how it worked.
So, here’s my first attempt. I gave it a silly name, and a silly look (I can’t remember how many times I must have used this « happy note » icon ; These nights I even use to see it everywhere in my dreams). Of course it is absolutely free as in GPL.
I used a bunch of cool NSIS macros to get a fashionable installer. Here’s what it looks like :
(Yes, we can discuss the colors etc. And we will.)
The sources are included in the installation, so everyone can see how it’s made. Plus, the whole thing is fully localized ; here the shots are in French since I took them on my computer, but on yours it will be in English (feel free to add other languages as well).
As you can see, quite a few options are available.
- LilyPond is installed by the exact same code than the usual mingw-bundle. The user is given the choice to install the bundled python as well.
- The jEdit Editor is installed using absolutely unmodified files. The user can choose to use the bundled Java Runtime Environment (version 1.6), and the jEdit launching routines will be modified accordingly ; however if the user chooses not to use the bundled JRE, the program checks if a decent JRE is available on the system — if there isn’t, it automatically re-selects the ’bundled Java’ option.
- LilyPondTool can be installed. This includes not only the plugin itself with all dependencies, but pre-configuration files as well, and a few LilyPond example files I added.
- The Sumatra PDF Reader is a free as in freedom lightweight and fast PDF reader. Because not every Windows user has Adobe installed (hopefully there are still some sane people out there).
- I’ll talk about the next two options in a minute ; the only other things I just wanted to mention is the « Offshore » option, which gives users the ability to install EasyLilyPond on a USB pen drive or whatever.
(OK, to be honest, this isn’t fully working yet.)
As I was writing the installer, I wondered what application it should offer to launch once the setup is completed. As a matter of fact, I was a bit reluctant to pop out the default LilyPad window ; I have seen many pupils, many newbies get scared or confused by this notepad-like that opens, like a README, absolutely not translated etc.
Opening a jEdit window was more tempting, but still a bit scary. I wanted the users to feel familiar with the program, to « prepare » them psychologically before letting them see the code.
So I wrote a small EasyLauncher (it is fully localized too, but I removed the French so you can see the English version). It is written in NSIS too (hey, I’ve just learned how to use it...) and uses the same skin. When you launch it, a smooth transparent splash screen fades in and out, and you can here a few notes of piano (I used the Free Software Song, as played by Markus Haist, with his very kind authorization).
This allows me to open, according to the user’s language, one or another example source files (e.g. a French user will see an example commented in French, with \include « italiano.ly », and so on).
Of course, the EasyLauncher also includes a bunch of links to the « Grand » documentation, the Lilypond Snippet Repository, the lilypondTool homepage etc.
OK, now for the really geek-dedicated part.
If you just click on « Write your first score », the jEdit editor will open and all you will see is a more detailed (and localized) version of the usual first-run file.
But if you DO choose to install the EasyLilyPond skin, here’s what’s coming next :
Yeah, I just like crappy colors
Notice, however :
- the nice transparence/blur menus effect (I’m using the whole new NimROD look and feel to obtain it)
- the customized icon Theme for jEdit (the default icons are somewhat boring)
- the customized « Run LilyPond » icon, in the LilyPondTool toolbar. I hope Bertalan won’t mind, but I find this icon more self-explanatory (plus I can easily describe it to my pupils, whereas the other one is hard to describe...)
EasyLilyPond, basically, is just a demonstration of some concepts, and a way to spread LilyPond as much as I can (particularly to my pupils, the average Windows users I know, etc). I had a good time working on it, and I’m looking forward to see if this can go anywhere.
I have to confess that, as I developed it on an old cheap 600MHz box, I have absolutely no idea how optimized the program is, and how fast it would run on a modern computer — not to mention the obvious lack of compatibility of a certain so-called ’modern’ OS...
Thank you for reading, Merry Xmas to all !