- Joined
- Oct 6, 2020
My syndrome gives me an intellectual constraint - I'm the smartest man in only certain given rooms, and there are many activities that repulse me. But there's one activity that compels me: it is the writing of my Text Format Music software.
What is Text Format Music?
Text Format Music (TFM) is the plaintext musical notation I devised years ago and undertook as a software project ever since. Let's see an example:
And it is readily composable in any text editor, and usable with the TFM software itself, which I coded from the ground up. At this time, it converts my files to valid MIDI - that is, to sound, with limited sheetmusic support (input, compile with -DLY) And it's comfy to use!
TFM was born from the concept of "squares" - pairs of characters provably sufficient for many kinds of music - and the vertical parallel by which the file is read by columns, not by rows. Each column corresponds to the same time in music, and a "block" of columns is ended with a "broken square"
My software is written in C, with a Flex lexer generator file featuring lots of code you'll never need to see, paired with simplified regex rules anyone could extend. Due to the unique syntax, I find my software to be immensely easier than anything else for its purpose, and for all the effort I've got ahead of me, I'd invite folks to contribute if I weren't nervous about code from undoxxed individuals.
How can I try TFM?
You can download this Linux shellscript to get it and here's some input files. Complete source code is tfm.l, main.c, multi.c and all you need is Flex and a compiler, but the Linux shellscript will walk you through it entirely. Last I checked it compiled on Windows - maybe get the flex output instead of the tfm.l input - but it's all CLI right now, until I finish the C# Notepad clone I've forked for a GUI.
What is Text Format Music?
Text Format Music (TFM) is the plaintext musical notation I devised years ago and undertook as a software project ever since. Let's see an example:
Code:
][ MIDI channel 0 and 1 with title
][
[]T: Laughing_With\
[]ch \\-B\\\\\\\\\\\
[]ch \\-A\\\\\\\\\\\
[]ch \\-A\\\\\\\\\\\
[]ch \\-A\\\\\\\\\\\
[]ch \\-A\\\\\\\\\\\
[]ch \\-A\\\\\\\\\\\
[]ch \\-A\\\\\\\\\\\
[]ch \\-A\\\\\\\\\\\
[]ch \\-A\\\\\\\\\\\
][
][ midi instrument 54 (decimal), vocals, on channel 1
][
[]in \54\
[]in \--\
[]in \--\
[]in \--\
[]in \--\
[]in \--\
[]in \--\
[]in \--\
[]in \--\
][
][ tempo and first notes: flattened notes are lowercase and naturals uppercase. Get SHARPS in []pi instead.
][
[]Q: \\ 77
[]PI \\d3--F3--\\e3------\\C3a2\\b2\\
[]PI \\F3--C3--\\b2--C3C3\\a2F2\\G2\\
[]PI \\b2--a2--\\G2--a2G2\\F2d2\\e2\\
[]rh \\naaanaaa\\naaanana\\nana\\na\\
[]PI \\----F2--\\e2--e2C2\\----\\--\\
[]PI \\F2--C2--\\b1------\\C2a1\\b1\\
[]PI \\b1--F1--\\e1--a1G1\\F1d1\\e1\\
[]rh \\naaanaaa\\naaanana\\nana\\na\\
][
][ And yes, that's rhythm: "--nanana naaaaaaa"! Proportional to the duration of the note.
][
[]ly No-one laughs at God in a hospital, No-one's\
[]ly no-one laughs at God in a war. \\
[]PI \\----d3d3d3--d3d3e3C3b2a2--b2b2--\\------b2-b2-b2----a2-b2-C3C3C3------------b2-a2-\\\
[]rh \\----nananaaananananananaaananaaa\\------naanaanaaaaanaanaanananaaaaaaa------naanaa\\\
[]PI \\F3--------------F3--------------\\e3----------------------C3----------C3----------\\\
[]PI \\d3--------------C3--------------\\b2----------------------a2----------G2----------\\\
[]PI \\b2--------------a2--------------\\G2----------------------------------------------\\\
[]rh \\naaaaaaaaaaaaaaanaaaaaaaaaaaaaaa\\naaaaaaaaaaaaaaaaaaaaaaanaaaaaaaaaaanaaaaaaaaaaa\\\
[]PI \\F2--------------F2--------------\\e2----------------------e2----------e2----------\\\
[]PI \\----------------C2--------------\\b1----------------------------------------------\\\
[]PI \\b1--------------F1--------------\\e1----------------------a1----------G1----------\\\
[]rh \\naaaaaaaaaaaaaaanaaaaaaaaaaaaaaa\\naaaaaaaaaaaaaaaaaaaaaaanaaaaaaaaaaanaaaaaaaaaaa\\\
][
][ Lyrics display at the very time they're printed in a jukebox-compatible MIDI player.
][
[]ly laughing at God when they're starving or freezing or \
[]ly so very poor. \
[]PI \a2b2C3b2C3b2a2--a2b2C3b2C3b2a2--\\b2--a2a2a2----------------------\\
[]rh \nananananananaaanananananananaaa\\naaananana----------------------\\
[]PI \C3------C3------C3------C3------\\a2------------------------------\\
[]PI \a2------a2------G2------G2------\\F2------------------------------\\
[]PI \F2------F2------e2------e2------\\d2------------------------------\\
[]rh \naaaaaaanaaaaaaanaaaaaaanaaaaaaa\\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\
[]PI \C2------------------------------\\a1------------------------------\\
[]PI \--------------------------------\\--------------------------------\\
[]PI \F1----------C2--e1----------C2--\\d1------------------------------\\
[]rh \naaaaaaaaaaanaaanaaaaaaaaaaanaaa\\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\
And it is readily composable in any text editor, and usable with the TFM software itself, which I coded from the ground up. At this time, it converts my files to valid MIDI - that is, to sound, with limited sheetmusic support (input, compile with -DLY) And it's comfy to use!
TFM was born from the concept of "squares" - pairs of characters provably sufficient for many kinds of music - and the vertical parallel by which the file is read by columns, not by rows. Each column corresponds to the same time in music, and a "block" of columns is ended with a "broken square"
][
, akin to a master linebreak.My software is written in C, with a Flex lexer generator file featuring lots of code you'll never need to see, paired with simplified regex rules anyone could extend. Due to the unique syntax, I find my software to be immensely easier than anything else for its purpose, and for all the effort I've got ahead of me, I'd invite folks to contribute if I weren't nervous about code from undoxxed individuals.
How can I try TFM?
You can download this Linux shellscript to get it and here's some input files. Complete source code is tfm.l, main.c, multi.c and all you need is Flex and a compiler, but the Linux shellscript will walk you through it entirely. Last I checked it compiled on Windows - maybe get the flex output instead of the tfm.l input - but it's all CLI right now, until I finish the C# Notepad clone I've forked for a GUI.