logoalt Hacker News

Show HN: MTXT – Music Text Format

82 pointsby daninetlast Sunday at 10:21 AM32 commentsview on HN

Comments

gilraintoday at 1:23 PM

How does this compare to standard ABC? More capable, presumably, but a comparison would be useful.

https://en.wikipedia.org/wiki/ABC_notation https://abcnotation.com/

show 1 reply
matheusmoreiratoday at 4:54 PM

To me it seems like files could get hard to understand if events that happen simultaneously aren't horizontally lined up like this:

  2.0 voice1 | voice2 | ...
Like a text version of old school tracker interfaces:

https://youtu.be/eclMFa0mD1c

  POS | TRACK #1 | TRACK #2 | ...
dghftoday at 1:33 PM

Similar things:

* Perl MIDI::Score -- https://metacpan.org/pod/MIDI::Score

* Csound standard numeric scores -- https://csound.com/docs/manual/ScoreTop.html

* CsBeats (alternative score language for Csound) -- https://csound.com/docs/manual/CsBeats.html

show 1 reply
chaosprinttoday at 6:35 PM

Some simple thoughts:

I feel that one challenge of programming languages is how to remember these rules, formats, and keywords. Even if you're using familiar formats like YAML or JSON, how do you match keywords?

When developing Glicol (http://glicol.org/), I found that if it's based on an audio graph, all node inputs and outputs are all signals, which at least reduces the matching problems. The remaining challenge is ensuring that reference documentation is available at the minimal cost.

jasonjmcgheetoday at 6:00 PM

This would lend itself well to a live-coding/live-music experience.

I played around with a similar idea on my own (very simple / poor) text music environment:

https://github.com/jasonjmcghee/vscode-extension-playground?...

in the middle of making an extension to allow making vs code extensions live because I wanted a faster development feedback loop.

Grom_PEtoday at 3:23 PM

This made me remember old set of tools called mtx2midi and midi2mtx, I used them to edit some midi files while making sure I'm not introducing any unwanted changes. While roundtrip output was not binary identical, it still sounded the same.

Looks like MTXT tool here does not quite work for this use case, the result of the roundtrip of a midi I tried has a segment folded over, making two separate segments play at the same time while the total duration got shorter.

https://files.catbox.moe/5q44q0.zip (buggy output starts at 42 seconds)

show 2 replies
vessenestoday at 2:20 PM

Cool. My one concern with this is that it has no horizontally scannable note/chord mode. It’s super common for humans to read a sequence of notes left to right, or write it that way, but it’s also just more efficient in terms of scanning / reading.

Can I suggest a guarded mode that specifies how far apart each given note/chord is by the count, e.g.

  #1.0:verse1 
  Am - C - G - E - F F F F
  #
You could then repeat this or overlay a melody line like

  #0.25:melody1
  C4 - C4 - C4 D4 C4 - D4 - D4 - D4 E4 D4 -
  #
Etc. I think this would be easier to parse and produce for an LLM, and it’s would compile back to the original spec easily as well.
show 1 reply
rock_artisttoday at 1:04 PM

Hey, the idea is nice, It would be great to know what pushed you to start this format.

Also, any apps that uses it would benefit from being add to the repo assuring usability in addition to readibility.

show 1 reply
1313ed01today at 12:44 PM

I like the idea overall. Looks like something that would be fun to combine with music programming languages (SuperCollider/Of etc).

Not so sure how human-friendly the fractional beats are? Is that something that people more into music than I am are comfortable with? I would have expected something like MIDIs "24 ticks per quarter note" instead. And a format like bar.beat.tick. Maybe just because that is what I am used to.

show 2 replies
formula1today at 7:23 PM

This is pretty neat

I'm wondering if it can be used alongside strudal https://strudel.cc/ Either mtxt => strudal or strudal => mtxt

Heres strudal in action https://www.youtube.com/shorts/YFQm8Hk73ug

xrdtoday at 3:54 PM

I've been spending the last week casually looking at strudel.cc.

They have a notation that looks similar (basically a JavaScript port of the Haskell version).

I like this, but I'm curious why I would want to use this over strudel. Strudel blends the language with a js runtime and that's really powerful and fun.

throw7today at 4:26 PM

It makes no sense to design for llm's. Do what makes sense for the reader and forget that llm's exist at all.

show 1 reply
lokartoday at 3:47 PM

I have been using:

https://www.vexflow.com/

Which has a text format, and typesets it for you nicely.

intrasighttoday at 1:28 PM

I think that for completeness it needs looping and conditional constructs

yaoke259today at 12:32 PM

pretty cool!

jan_Satetoday at 4:39 PM

Obligatory xkcd: https://xkcd.com/927/

giladvdntoday at 1:05 PM

Probably stating the obvious here, but this would be a good way for an LLM to attempt to write or modify music.