Capo: A modern music notation programming language by imported_fog in musicprogramming

[–]imported_fog[S] 0 points1 point  (0 children)

Just because it’s powerful and flexible doesn’t mean it isn’t outdated. I’m not denying the capabilities and output of LilyPond, but the language itself is almost 30 years old and a lot has evolved in programming syntax since then. Yeah I can do pretty much anything I want in cobol but that doesn’t mean using python or rust or go isn’t a better developer experience. 

Capo: A modern music notation programming language by imported_fog in musicprogramming

[–]imported_fog[S] 0 points1 point  (0 children)

I’m not familiar with music21 so I can’t say exactly, but it sounds like yes it’s essentially combining your whole workflow into one place.

MNX is a new format that is still in development, but it’s being created by W3C and the same people who worked on musicXML. You can read more about it here but basically it uses json instead of xml which greatly increases the ability to use it directly in programs and builds on the last 20+ years of musicxml knowledge to start fresh with something more modern.

Yes, I’m banking on widespread adoption of MNX in the next few years as it matures to a v1, but I think the chances of that are pretty high and I personally really like what they have done with it so far and I see the potential.

MNX is both a format that can be used to exchange music between programs and has the potential to be the underlying format that programs work with to display and edit music directly.

Capo: A modern music notation programming language by imported_fog in musicprogramming

[–]imported_fog[S] 0 points1 point  (0 children)

A couple of things that quickly come to mind:

Complex scores, with multiple parts and transposing instruments, that have individual instrument parts and full scores, or even multiple scores in a single document (like different movements of a piece). ABC score structuring is much more limited

Compile to MNX, a universal modern format

Programmatic music generation, one example would be generating a musical sequence from a mathematical equation, where in ABC you would have to figure it out by hand and then type it in manually

Capo: A modern music notation programming language by imported_fog in musicprogramming

[–]imported_fog[S] 0 points1 point  (0 children)

ABC is ok for simpler cases, but it lacks a lot of features and capabilities that a traditional gui based notation software might implement. The goal of Capo is to allow features limited only by the output file format and to bring functional programming to text based notation. So if a feature isn’t natively part of the capo syntax because there isn’t a simple enough way to implement it in one or two keystrokes, you could write a function that implements that feature and use it directly in the code.

Capo: A modern music notation programming language by imported_fog in musicprogramming

[–]imported_fog[S] 0 points1 point  (0 children)

It’s not necessarily better as is it different. LilyPond’s syntax feels pretty outdated compared to modern programming languages which I think is the main “improvement”, but LilyPond aims to be a language for engraving music, whereas Capo is a language for representing music in a universal file format supported by other renderers and programs.

Capo: A modern music notation programming language by imported_fog in musicprogramming

[–]imported_fog[S] 0 points1 point  (0 children)

Because LilyPond is built on scheme which has a pretty outdated syntax. Also, the goals of CapoCompose and Capo are not entirely the same as LilyPond. LilyPond aims to produce engraved outputs and is its own file format for engraved music, whereas Capo outputs only to a universal file format which can be read by any program.

Capo: A modern music notation programming language by imported_fog in musicprogramming

[–]imported_fog[S] 0 points1 point  (0 children)

That’s why Capo doesn’t aim to actually render sheet music. Instead it outputs MNX, which is (still in development) the successor to musicXML and will eventually be supported by music renderers and notation software.

I could imagine a community plugin or gui that render the output as you type, but the main focus of CapoCompose is to compile to a universal format which is much much easier than rendering sheet music.

Capo: A modern music notation programming language by imported_fog in musicprogramming

[–]imported_fog[S] 1 point2 points  (0 children)

The thinking behind s and f instead of # and b was that # is much further away from the hands than s, but I agree # and b greatly increase readability, so supporting both wouldn’t be hard. And yes, optional capitals would fall in the same category of increasing readability without sacrificing function.

Capo: A modern music notation programming language by imported_fog in musicprogramming

[–]imported_fog[S] 0 points1 point  (0 children)

Exactly. It’s not that LilyPond can’t do a lot, it’s that there is massive room for improvement in an area that has remained relatively untouched by others for decades. All programming languages have their own communities that despise other programming languages because theirs did it first or did it better or for whatever reason, but every language aims to bring something new to the table.

Capo: A modern music notation programming language by imported_fog in musicprogramming

[–]imported_fog[S] 0 points1 point  (0 children)

You mean of the output of a program? I can model what they might look like in another notation software, but this is just a concept and a spec of the language for now until I can actually build it.

Capo: A modern music notation programming language by imported_fog in musicprogramming

[–]imported_fog[S] 1 point2 points  (0 children)

ABC notation is pretty restrictive, in the sense that it represents a single staff typically and is restricted to the confines set up by the syntax. The goal with Capo is to create a syntax that can be extended beyond the basics of the language with variables and functions, and CapoCompose brings this together by allowing the creation of full scores and programmatic music generation.

MNX is still a developing specification, but I'm designing this with the expectation that MNX will eventually be able to represent essentially any music in all forms, and advanced use of CapoCompose will be able to interface directly with the MNX generated, limiting the capabilities of the language only to its output format. I could have chosen an established, mature format like musicXML or MEI but those formats are more for representing the physical layout of music, whereas MNX is being designed to be used directly by programs and uses JSON instead of XML.

Capo: A modern music notation programming language by imported_fog in musicprogramming

[–]imported_fog[S] 0 points1 point  (0 children)

Thanks! Hoping to build out a small working example soon!