Hacker News new | ask | show | jobs
by scrollaway 2845 days ago
I'm not familiar with LilyPond. Is there no possible client-side generation?

For example VexFlow (http://www.vexflow.com/) or, even with music, abcjs (https://abcjs.net/). Both of those use their own language.

A cursory look at the lilypond docs makes it seem like the language is pretty simple and straightforward... although, the source code looks nuts. How hard do you think a JS parser/vm for it would be?

Edit: been looking at some large lily projects from mutopiaproject linked below. Oof. There's more there than the docs let on. Still, would be a very interesting project...

1 comments

To parse LilyPond you would first need to write a Scheme interpreter. Once you finally get a tree for the sheet music, rendering in a way that is correct, beautiful, and easy to read is no small task either. Sheet music rendering is full of so much nuance [1], and it's really hard to get it right. It took brilliant people many years to get LilyPond to the state it's in today. I picked LilyPond because it's powerful and beautiful. Don't get me wrong, VexFlow and abcjs are impressive projects, but LilyPond has a head start.

I think one day, you'll be able to use emscripten or similar to run LilyPond in the browser. We are not there yet.

[1] See, for example, https://www.amazon.com/Behind-Bars-Definitive-Guide-Notation...

The sample music in abcjs has some very clearly wrong things. For example, the spacing near accidentals is too tight and there's open spaces on the left hand side of some of the measures.