Mathjax analog for lilypond [closed]

2019-02-03 12:23发布

问题:

Is there something that can render Lilypond content to an image, such as mathjax?

Also, in my mind it would be nice to open a Stack Exchange forum about music. Such a thing would bring nice functionality to it, like LaTeX in http://math.stackexchange.com and so on.

回答1:

Why Lilypond and what else is there?

Musically educated people hate ABC notation, but apparently it is ideal for forums just as TeX for math fomulas (e.g. via MathJax). Lilypond is very advanced in its integration (TeX, HTML) and platform support (Windows, Linux, Mac). It is also recommended by pedants who are crazy about producing beautiful note sheets (see http://lilypond.org/web/switch/advantages).

Here is a nice review of note editors, so Lilypond is not limited to TeX integration only - it also produces nice .PS and .SVG files.

Vexflow is a nice javascript engine based on Raphael for programmatic drawing of music notation, but it is really for programmers. It has also a web-based SaaS http://static.vexflow.com/ as described by the 0xfe blog.

Other javascript rendering libraries supporting ABC notation are abcjs and abcnode. IMO abcjs is the closest to MathJax in the sense of HTML5 js rendering.

MusicXML implements a non-ABC approach. This XML notation has become really well-supported since 2012, but essentially it is very cumbersome (just like MathML vs. TeX). There are also a number of JS renderers supporting MusicXML such as score-library.

Is there a stack exchange forum with music typesetting?

It seems there is proposal for typesetting, but it has been proposed to merge all computer music notation related questions into https://music.stackexchange.com/

Coupling with playing music

http://0xfe.blogspot.ch/2010/05/music-notation-with-html5-canvas.html

This is another interesting task, i.e. to render the notation into MIDI or HTML5 audio element, but it is a topic for a different question.



回答2:

There is a WordPress plugin called ScoreRender. Also there are several cloud services like LilyBin or WebLily but it is not really possible to embed their outputs in web pages.

There is an Area51 proposal for Music Typesetting (it is proposed to be LilyPond-specific but despite typesetting music with nothing but LilyPond for years myself, I suggest it being more generic). If you like the idea, follow it and spread the word!



回答3:

Closest thing that I can think of is Vexflow which is a Javascript/HTML5 layout engine. It won't render Lilypond notation files directly (since Lilypond files are basically Scheme macros, it's difficult to get anything but Scheme to parse more complex Lilypond). If you absolutely need Lilypond parsed, you could hack Abjad, a Python package that can parse Lilypond, and maybe link it up with the Vexflow outputting mechanisms of my Python package music21. But you'd probably be better off making a pure Javascript converter to the Vexflow intermediate representation. It's hard stuff, but know that others are working on such things, so you're not alone.