News for hackers. Stuff that matters.
Re:Ask HN: What are you working on? (May 2026) by meltmymind on Monday May 11, 2026 @11:24AM (#48096258)
Very cool. I'm working on something similar, for composing songs with both note-playing instruments and drum instruments. The format is TOML-based, and for melody I was inspired by strudel, but I had considered using ABC notation as well. The home page has an example of the format, and some demo songs: https://songformat.com
Re:Ask HN: What are you working on? (May 2026) by luigi_123 on Tuesday May 12, 2026 @08:00PM (#48116176)
Your TOML-based syntax is really interesting.

> "drums: (bd ~ sd ~)32",

> "drums: (([email protected])8)32",

> "drums: (cr@1 ~@15)8"

I definitely considered stuff like that but in the end decided to have every note spelled out. I might reconsider though! Right now it's really annoying to have reaaally long lines of `kd/2` ad infinitum to write double bass.

I'm split between three options right now:

1. Just add multipliers like you did (`kd/2 * 16`), but I feel that makes it less "music" and more "program".

2. Special syntax sugar just for well known patterns that are repeated in many songs, like `dkdk` expands to a full bar of double bass, or xxx expands to one full bar of 8th notes on the hi-hats.

3. Have the user define custom pattern on their own, like `xxx = x x x x x x x x`, like C macros.