Hacker News new | past | comments | ask | show | jobs | submit login

Very cool! I run LilyBin (http://lilybin.com), which I've unfortunately let languish. I compile using AWS Lambda and stay within the free tier. Did you consider using Lambda?



Very cool work -- I'm a fan.

I considered Lambda and similar, but keeping LilyPond running as a server allows for lower latency, which is important given how long it takes for LilyPond to start up.

I don't think I'd be able to have the kind of live reloading I implemented here with Lambda.


The reason I switched to Lambda was to handle bursts. Occasionally some teacher would have a classroom open LilyBin, and my one server couldn't compile 30 scores at once. Lambda made it easy to handle.

Hacklily is great! Obviously doing fine with the HN burst! I may just point people to yours at some point.


This sounds like a really interesting problem. What kind of transformation is taking place during compilation, datatype wise, like are you rendering audio serverside?

I wonder for a classroom setting, if many people compile similar scores, if there's any opportunity to say "the first half of all these scores are the same, compile it once and concatenate it with the unique pieces"...caching composition...I'm sure I'll play with it someday.


For Hacklily, it turns out that the audio is rendered clientside via https://github.com/hacklily/hackmidi

Caching sheet music rendering is a hard problem. For example, a note later in the score can affect the spacing of notes before it.


If you have considered using a queue, what were your reasoning to prefer lambdas?


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...


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.


Oh neat.. I used to maintain a similar WordPress plugin well over a decade ago. https://chris-lamb.co.uk/projects/figurerender




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: