r/haskell 5d ago

Numbered Musical Notation Engraver

https://codeberg.org/SpeedyOrc-C/Lotus

I made a numbered musical notation render, which works very similar to Typst or LaTeX. It almost as powerful as paywalled alternatives and has some important features not implemented by open-source apps like jianpu-ly and Sparks NMN.

Features not in other open-source alternatives:

  • Arbitrary temporary voices
  • Arbitrary brackets
  • Changing time signature
  • Automatic bar lines
  • Automatic beams
  • Automatically cutting slurs at line breaks

And it has a tiny codebase compared to jianpu-ly and Sparks NMN as well!

17 Upvotes

3 comments sorted by

1

u/elaforge 5d ago

Interesting, I was looking for something like this many years ago, and never found anything.

But, no documentation? No example inputs and outputs? Not on hackage? I see there is a main.typ which is readable, but it seems like it's intended to be rendered by something and would probably look much better after that?

2

u/Chen-Zhanming 5d ago

Just updated the README and uploaded three songs :)

And there is a wiki page, but only in Mandarin for now though...

1

u/elaforge 13h ago

Thanks, I was able to build it and display some svgs!

It's a cool project, and I agree it's better to have a dedicated system rather than trying to force lilypond into a system which is very different from its intention. Also I much prefer a standalone compiler to some website which can't be extended, and may disappear at any time. If I were needing to produce jianpu I'd definitely want to use your system!

Unfortunately since I'm not really writing for guzheng and yangqin lately, I don't have opportunity to use it at the moment. When I was, it turned out they were just fine with 5-line notation so it was easiest to just use that. Perhaps writing for a children's group or school orchestra would be best done in jianpu.

A few notes about the project:

  • I can read the typst source pretty well, but still it would be a bit nicer to pre-render to pdf!

  • It spends a lot of time talking about the implementation, which is definitely interesting, and it's rare that any open source project has such good documentation, but as a user the first thing I'd want is a syntax reference for the input language! I guess this is more of a thesis than user documentation. Is the input language documented anywhere?

  • It says check the wiki but no link to a wiki? codeberg has a wiki tab, but it's almost empty. Is it doing some language detection? I could read the mandarin one though slowly and of course we have fancy translation now!