No LilyPond export

• Oct 5, 2015 - 16:43

Hi all,

I recently upgraded to MuseScore 2.02 (3543170) on my Linux Mint 17.1 and I can't find anymore the option to export files in LilyPond format (.ly). The options I have are:

- in Save and Save As...: .mscz and .mscx
- in Export...: .pdf, .png, .svg, .wav, .flac, .ogg, .mp3, .mid, .xml, .mxl and .mscx

Has this feature been removed, is there some problem with my installation or am I just being blind and not finding it? Any help would be highly appreciated.

Cheers,
Gilberto


Comments

It unfortunately became impossible to continue to support multiple formats, so focus has shifted to MusicXML export as the supported way of interoperating with other notation software. And considerable improvement has been made in the quality of the MusicXML export. You can then convert that to LilyPond format using the tools provided by that project.

In reply to by Monteverdi2

Yes, lack of manpower and industry standards are the real reasons.
If a contributor would come along and remain dedicated to support lilypond format for a considerable amount of time (multiple years) then it has a good chance of being included.
Note that this does not only require intimate knowledge of the lilypond file format, but also of the MuseScore internal score representation; something that undergoes continuous and sometimes major changes between (major) versions.

Due to the lack of such a contributor and time, efforts have been focus (for score export) on MusicXML. It has a much wider userbase (including lilypond) and is an acknowledged industry standard exchange format.

In reply to by Monteverdi2

If we didn't want users of other programs to be able to access scores created in MuseScore, we wouldn't work so hard to make our MusicXML export as good as we can. But it's a huge undertaking to support even one non-native export format.

I for one would be thrilled if someone were to dedicate themselves to maintaining the tools for converting LilyPond to and from MusicXML. That would be a much more effective use of someone's time than implementing LilyPond export in MuseScore - greater benefit for less cost.

In reply to by Marc Sabatella

Let me say that I used to (20 years ago) work with a PC-based music system whose developer(s) most assuredly did not want easy export to any other platform, so this is not unheard of (although, clearly, MS is not of that kind). Importing my scores knowledgeably (i.e., had to known the music) with MIDI was not too difficult, except for multi-voice-in-staff parts, esp. continuo right hands, which were uniformly illegible when imported in this way (but have all been fixed now, esp. with 3.x stretchable arpeggi).

In reply to by [DELETED] 1831606

I don't think you can generalise developers in such a way, since there is a fundamental difference in principles between open source and proprietary software developers. I am involved in many open source communities and I still have to find one which would actively be against mutual collaboration or making their files as accessible to other platforms as possible.

Yes, MusicXML is the way to go when exchanging scores between different applications and fileformats.

Future feature request:
It would be nice if Musescore had a built-in way to organise different existing external converter tools from/to MusicXML. (xml2abc, abc2xml, musicxml2ly, python-ly, xml2hum, hum2xml). I am thinking of a system similar to what is used in LyX. Maybe you know this software? It allows me to add fileformats, and to add "converters" that call external commands to convert from one fileformat to another. Translated to MuseScore: It would allow me to define file import and export commands to/from MusicXML using external tools and store them. For example: I have commands for abc2xml, xml2abc, musicxml2ly, ly musicxml, xml2hum, hum2xml, nwc2xml, bww2mxml, on my Linux system. It would the be possible for me to import/export from/to lilypond, abc, humdrum, etc. using Mscore directly. Surprise: On my own Linux system I can already do this. I wrote a Python script and a Musescore2 plugin, that gives me this. But it is not cross platform and very specific to my own laptop. So don't ask me to publish it. I would prefer a cross platform LyX style approach.

BTW: On Linux I can use mscore as a commandline tool to convert fileformats supported by Musescore. I don't use Windows often, but does this also work on Windows? I tried using CMD.EXE and teh PowerShell but can't get it working the same way as in Linux.

Not quite the same here. Did anyone really try?

On my linux system:

$ mscore --version

returns

MuseScoreDevelopment 2.1.0

In my windows CMD.EXE window:

> mscore --version

returns

'mscore' is not recognized as an internal or external command, operable program, or batch file

I have been following this thread with some interest and thought it might be a good idea to give Lilypond a tryout. I downloaded and installed it and managed to get it working.

I have since been experimenting with a short score that I had prepared earlier in MuseScore. I transferred it, although I couldn't sort out how to use an XML MuseScore export file. I more or less rewrote my music from scratch. Coming from a background that includes quite a lot of computer programming, this wasn't a problem, and I quite like the method of input via (compiled) text files (I simply used "Notepad"). Once familiar with Lilypond, this method of score writing makes a lot of sense. I have enjoyed using it -so far.

However......

I have looked very closely at the graphic quality of the pdf file that Lilypond produces, and compared it with the graphic quality of the pdf that I exported from MuseScore. Even at large magnifications I can see no difference in print quality. Could this be down to the printer I am using? Is Lilypond better for postscript or similar higher quality printers?

So why use "Lilypond"?

Don't get me wrong. I am not criticising Lilypond. My question is simply one of print quality. MuseScore is such a delight to use to prepare scores and I can see no difference in output quality. MuseScore also allows me to play my music back, so I can hear my mistakes and correct them as I go along. So why use Lilypond?

Please keep up the good work at MS.

Regards to all users
Andrew

In reply to by ahiw

> So why use "Lilypond"?

Here are my views on this:

- the default layout of a LilyPond score is far superior to anything I have ever seen (note the word default, meaning that one isn't dragging dynamic markings around, fixing collisions manually, etc.)
- I also think the quality of LilyPond is superior to other programs I tried
- LilyPond can handle even the most complex contemporary music scores. See for instance: http://lilypond.1069038.n5.nabble.com/file/n153387/interruptive-polypho…
- LilyPond can precisely create proportional notation, once again necessary in many contemporary music scores
- for some people (particularly people that spends tons of time programming), typing is much faster than clicking around. Once the learning curve of LilyPond is overcome, it's actually pretty fast to enter a score on it
- LilyPond does output MIDI files if you want so you can hear what you typed
- as for the intput, there is a program called Frescobaldi which is a LilyPond dedicated editor, and it makes life much easier for inputing a score
- LilyPond shines when it comes to complex functions: do you want every single F sharp note to have a red stem? Easy peasy. You want notes having an "x" in the middle at their stem at exactly 0.3 mm above or below the notehead? Done.

See some examples here:

http://lilypond.org/ly-examples/cary.png
http://lilypond.org/ly-examples/bach-schenker.png
http://lilypond.org/ly-examples/Stockhausen_Klavierstueck2.png

In reply to by ahiw

MuseScore and Lilypond both use vector fonts to produce music, not image bitmaps, so there will be no difference in "picture quality". Of course, you might decide you prefer one program's set of fonts.

I've not used Lilypond myself, but I have used LaTeX which is a similar program for compiling text documents from source files. The theoretical advantages of such programs are that they take care of layout and formatting for you, allowing you to concentrate on the actual content. They also allow you to take advantage of coding concepts like variables and custom macros. However, the learning curve with these programs is comparatively huge compared to WYSIWYG editors like MuseScore or LibreOffice.

LaTeX is great for creating text documents because it doesn't matter that you write the text in a source file; the text is still text! I don't think the benefits are as clear for sheet music, because the text representation Lilypond uses is nothing like actual music. Also, you can get most of the benefits of macros in MuseScore by writing plugins and creating templates, and if you don't want to worry about layout then use Continuous View. As you said, MuseScore can even do things that Lilypond can't, like play files so you can listen to them.

In reply to by shoogle

Just a small comment about this:

> MuseScore and Lilypond both use vector fonts to produce music, not image bitmaps, so there will be no difference in "picture quality".

Sure, but that's not what I meant by quality of the pdf output. I am very new to MuseScore so I will refrain from making any comments about the pdfs it produces, but take Sibelius for instance (I used to work with it until one year ago): it also uses vector fonts, but there are some barbaric problems with their pdfs. For instance, the stems and the noteheads do not connect properly and it simply looks terrible. Another example is their straight lines, all of which have very sharp corners and also look terrible in print.

In reply to by gsagostinho

Our posts crossed (I started writing mine before you posted yours so I didn't know your post existed). When I said "picture quality" I was referring to @ahiw's comment "Even at large magnifications I can see no difference in print quality." No, you won't see any differences and you wouldn't expect to see any. ;)

You might be right about Sibelius' layout problems in PDFs, I wouldn't know, but I would consider this a bug (and a very serious one at that!) and not a result of the fact that Sibelius happens to be a WYSIWYG editor. Lilypond is just as likely to have these problems as MuseScore or Sibelius. Thankfully, neither MuseScore or Lilypond appears to suffer from these problems.

So the real benefit that Lilypond has is with complex layouts. The examples you gave are far more complicated than anything most users would ever want to create. (Of course, the fact that you only showed the output and not the code means you haven't actually proven that these were particularly easy to create with Lilypond, or even that they were easier to create in Lilypond than MuseScore, but I'll take your word for it on this.)

I agree that Lilypond is probably better for professionals (or very keen amateurs) who are typesetting an existing score. If you have already composed a score (possibly in MuseScore) and now you want to publish it, or if you are modernising the notation in an out-of-copyright classical piece, then Lilypond is probably the way to go. However, I think that MuseScore is clearly better for everyday users and even for professional composers who are in the act of composing a new score from scratch. The fact that you can enter notes using a MIDI keyboard is invaluable for composition.

In reply to by ahiw

I do agree with those pointing out that LilyPond is definitely capable of being used to create extremely complex scores more easily than a WYSIWYG program like MuseScore, and also with those pointing out MIDI note entry is not necessarily much of an advantage to WYSIWYG.

The points I think most worth emphasizing are these, though:

1) The sense in which the default output of LilyPond can be better than that of MsueScore has nothing to do with how good the details fo the PDF look when zoomed in. it's the more basic things like, how are the notes spaced within the measure, do dynamics and other elements attached to notes adjust position to avoid conflict with other symbols, etc. no doubt LilyPond is more sophisticated in such amtters, although it should also be pointed out that MuseScore 2 is leaps and bounds better than 1.3 was in these respects.

2) While LilyPond *can* be used to produce complex scores more easily than a WYSIWYG program *if* you happen to have the kind of mind that can deal with a text-based input language for music, the reality is, only a very small minority of musicians are likely to be willing/able to make that adjustment. So for most people, a WYSIWYG program is still going to be easier even if it requires more hand-editing to get things to look right.

> Our posts crossed

Oh, I see! :)

> [...] and not a result of the fact that Sibelius happens to be a WYSIWYG editor. Lilypond is just as likely to have these problems as MuseScore or Sibelius. Thankfully, neither MuseScore or Lilypond appears to suffer from these problems.

You are completely right on this. I also just checked some pdfs produced by MuseScore and they do look pretty good.

> So the real benefit that Lilypond has is with complex layouts. The examples you gave are far more complicated than anything most users would ever want to create. (Of course, the fact that you only showed the output and not the code means you haven't actually proven that these were particularly easy to create with Lilypond, or even that they were easier to create in Lilypond than MuseScore, but I'll take your word for it on this.)

Oh, certainly those LilyPond files are not easy to create at all, but my point is that they would be extremely demanding (if not impossible) to create in other programs. That little example of Ferneyhough is over 300 lines of code long, but once the custom functions for the crazy beams and tuplets are defined, it really doesn't matter if your score is one or a thousand bar longs. To manually create that in most (if not all) WYSIWYG programs I know would be a nightmare (I know there are possibilities of creating macros in MuseScore, but I don't know how powerful they can be), and if someone tries to do that by manually dragging things around you may very well end up with a very inconsistent engraving.

> I agree that Lilypond is probably better for professionals (or very keen amateurs) who are typesetting an existing score. If you have already composed a score (possibly in MuseScore) and now you want to publish it, or if you are modernising the notation in an out-of-copyright classical piece, then Lilypond is probably the way to go. However, I think that MuseScore is clearly better for everyday users and even for professional composers who are in the act of composing a new score from scratch. The fact that you can enter notes using a MIDI keyboard is invaluable for composition.

I agree 100%, and I do see a huge value in MuseScore exactly for that. I myself use it for testing some musical ideas and notation, making some sketches and listening to it immediately, etc. Then for my complex compositions I tend to use LilyPond.

Cheers!
Gilberto

I know and use both LilyPond and MuseScore. LilyPond users always try to explain to Sibelius/Finale/MuseScore users why LilyPond is "much better" and try to convince them to start using LilyPond - usually without much succes. The LilyPond workflow is simply to much different from the WYSIWIG aproach Sibelius/Finale/MuseScore users are used to. Such discussions are time consuming and useless. We'd better use our precious time to make music and, or to improve Musescore (or LilyPond) with bugreports, realistic feature requests, and (if you are a programmer) with bugfixes and patches.

BTW: The "advantage" of inputting notes with a MIDI keyboard is highly exaggerated. It's always nice to impress novices and people who start using music notation software before they have properly learnt how to read/write music notation. (Rule #1: If you can't notate music without computer, you can't *with* computer either). A better idea is to learn to use MusScore's keyboard shortcuts: This will really dramatically improve your notation speed and accuracy.

In reply to by mtarenskeen

> LilyPond users always try to [...] convince them to start using LilyPond

Yes, I have seen this happening around (although I'd cut that "always"), but I don't consider myself to be one of those. I simply answered an user asking "why one would use LilyPond at all?". To be frank, I can totally agree that most people wouldn't really benefit of using LilyPond, and I rarely recommend it for someone who simply wants to notate music, period. Even at my university I rarely recommend it to my fellow composers, although I do talk about the advantages I see on it when asked.

> The "advantage" of inputting notes with a MIDI keyboard is highly exaggerated.

Yep.

In reply to by mtarenskeen

LilyPond users are the vegans of music notation. :-)

Speaking seriously, as Musescore both matures as a product and expands in terms of user base, I do believe there is actually a strong argument for the software to become more focused.

As mentioned before, there is a lack of resources that are both capable and willing to dedicate themselves to the task of maintaining high quality support for LilyPond format. If the demand for such a feature was really that strong, there would be contributors wanting to work on this. Due to lack of resources/demand, feature should be dropped.

I believe that as the software moves forward there should be a lot of similar features that should be dropped from the core functionality, instead moved to an extension or plug-in.

By keeping the core features leaner, development can move much faster, while niche use cases can still be supported through extensions and plug-ins.

I'd like to make a few comments on note entry by typing, and visual appearance.

Like some others, I also prefer to enter music mostly by typing instead of using a mouse. I found that MuseScore does this quite well, and became a lot faster for typing after I redefined a few keys. For note lengths, I use 1, 2, 4, 8, 6, 3 etc. for whole, half, quarter, eighths, sixteenth, and thirty-second notes. To raise and lower by an octave I use ' and , .

I have to say that with version 2 the appearance is excellent, with few adjustments. I seldom have to make any positioning adjustments. For my music I find that visual elements are very nicely spaced, and in that respect I don't think I can do better with Lilypond.

There are often some minor layout problems, but those are easily solved with some line breaks and adjustments of distance between systems. Some of those probably cannot be avoided with any scorewriter. I do hate it when one or two final measures are stretched out over a whole line, but this can be solved by appending a horizontal frame.

In reply to by Marc Sabatella

Actually, I don't know why anyone would want the last measure stretched. I can't think of a reason why the spacing should be any different than the spacing in other measures. I don't recall ever seeing such a stretched measure in printed music.

I just set it to 100%, and I hope that's the end of the nuisance.

In reply to by RexC

One reason you don't see single stretched measures in published music is that most editors go out of their way to avoid having a last system with only a single measure in the first palce - they deliberately play with where the line breaks happen to make all systems approximately equally full.

Anyhow, it's not just a single measure one has to be concerned about. What if there are four measures, say each with a whole note or maybe a couple of half notes? Depending on your settings, these might only take 20-40$ of the page width. But there are are many musical situations where you *do* want those last four measures stretched the full width - eg, songbooks that are printed four measures per line.

The point being, yes, there really are very common real world situations where you do want the last system strwetched, but it's difficult to know in advance which situations are which. And that is the defualt is chosen to be a compromise. like all compromises, it works well in some situations, less well in others.

In reply to by Marc Sabatella

"One reason you don't see single stretched measures in published music is that most editors go out of their way to avoid having a last system with only a single measure in the first palce - they deliberately play with where the line breaks happen to make all systems approximately equally full."

That's exactly what I have to do manually. However, if the music is very short, sometimes there are a few measures left over.

"Anyhow, it's not just a single measure one has to be concerned about. What if there are four measures, say each with a whole note or maybe a couple of half notes? Depending on your settings, these might only take 20-40$ of the page width. But there are are many musical situations where you *do* want those last four measures stretched the full width - eg, songbooks that are printed four measures per line."

Huh? Why shouldn't they take only 20-40%? It happens all the time with printed text, even with justified margins. Partial lines are common.

OK, I checked about 20 or more songbooks and other collections of short tunes from various sources. Most of them were engraved; some were handwritten. Every one of them simply truncates the line if they can't make a graceful, reasonably full last line.

I didn't find a single example that was stretched like Musescore output. Maybe your examples constitute a particular class? Should we go to the music library to count the examples?

A few of them stretch the last line somewhat in cases where it will make a full line, but I didn't find a single example of the extreme stretching that MuseScore does. I suggest a default value of something like 70%, instead of the current default value of 30%.

In reply to by RexC

I think you might be a little confused about how this works, or maybe about the type of situation I am talking about.

This is how the final four measures of a very simple song would look if they were not stretched to fill the width of the page:

justify.png

Without stretching, four measures of half notes & whole notes take less than half the width of page when using default staff size, default paper, etc. This is *not* how most songbooks are published - they would stretch that last system to fill the width of the page. So a low default actually makes perfect sense for cases like this, which are actually extremely common.

Something you might not be realizing is that *all* systems are normally stretched to some degree. If not for the stretching that occurs, your scores would have ragged right margins, like in a word processor if you don't have right justification turned on. So I think you will find if you set the fill threshold to 100% - thus completely disabling stretch - the measures on your last system will often look too narrow. They won't be receiving the stretch they would ordinarily receive had they occured on any other system. Which is why I tend to use horizontal frames when I choose to deliberately leave the last system unjustified - this gives me control over how wide those final measures are.

So if you do as many publishers would do and I would often recommend - fine tuning the stretch and line breaks throughout your score so the last system is no less full then others - you will not want fill set to 100%. You will *want* the last system stretch like all others. Depending on the density of your music (eg, are those final measures most half notes or mostly sixteenths), this might be best achieved with a threshold of 90% or 70% or 50% - it's really going to be very situation-dependent.

Bottom line: once again, the default is a compromise, and like all compromises, it works well in some situations, not so well in others. If you happen to mostly be dealing with the situations where a different default makes sesne, you are welcome to create a tempalte set up that way or save your make favorite group of style settings the default for new scores created from scratch via Edit / Preferences / Score.

Do you still have an unanswered question? Please log in first to post your question.