- Music theory education tools - Music generation (and the outputs could be transformed to MIDI format for example) - Piano chord finder
and similar.
Whats the target audience? A good musician knows the scales by heart (and also how they sound/feel) and for the others it's unclear to me what they would do with music theory they don't really understand.
For your second thought, I'm not really sure I understand the point.
Since this is a library, it can power any application that needs to understand or generate these abstractions. So to expand on some options I gave above:
- You can create a program that generates a piece in the style of a Bach cantata for example, using this library as the backbone.
- If a teacher wanted to create a tool to educate kids about scales for example, it can use this library as a backbone.
lmao
Given that it is 2026, what are some of the thoughts that go into choosing C99 vs C23, which I presume has more quality-of-life features?
I still write nearly ANSI compliant C for simple embedded things. Because somebody might need to figure out how to rebuild it in twenty years, and making that person's life harder for some syntactic sugar isn't worth it.
Even C99 can be a problem: for example, C99 designated initializers are not supported in C++. If your header needs to support C++ you can't use them (C++ forces you to initialize every field in the structure in order if you do it that way).
https://github.com/thelowsunoverthemoon/mahler.c/blob/4ebfe8...
Should that type have been mah_acci instead of int? mah_acci doesn't seem to be used anywhere.
Also, have you considered using (edit) designated initializer syntax for some of the function calls that take in structs as arguments?
https://cppreference.com/w/c/language/struct_initialization....
struct mah_scale scale = mah_get_scale(
(struct mah_note) {
.tone=MAH_C,
.acci=MAH_NATURAL,
.pitch=4
},
&MAH_BLUES_SCALE, notes,
MAH_ASCEND,
NULL
);As for second, that's a good point! Would definitely make readability better, thanks.