Hacker News new | past | comments | ask | show | jobs | submit login
Musical notation disguised as the oldest programming language
4 points by f2hex 18 days ago | hide | past | favorite | 4 comments
Can be the musical notation considered as a first form of "programming" language? In the and it is like a DSL, it has a symbolic notation, it allows the reproduction of "actions" on a device (musical instrument)...

It's not Turing complete. DSL yes. Programming language no.

Well that is not completely true: if you referred to the conditional aspect there is a way to execute/repeat and branching from specific section in a score conditioned by specific situation. "Repeat with different endings": https://en.wikipedia.org/wiki/Repeat_sign

Don't forget the Dal Segno, for which you have the Dal Segno al Coda (on repeat, jump to the sign) and Dal Segno al Fine (on repeat, jump to the end) which are if/jump statements. There is also the reverse, Da Capo Al Segno (from the sign) which is a jump, versus Da Capo by itself (from the start again). The coda looks like a circle with a + through it, the segno a fancy S with dots, and the fine looks like a cartoon eye.

These are similar to repeats, except that they branch.

Also, there are other "commands" for technique, such as , for "pause and breathe," ties and slurs, rubato, and glissando for how you connect the notes, crescendo/diminuendo, fortes and pianos, for volume control, etc. There are a lot of these "object oriented" touches. Consider the zigzag "trill".

There is also another branch type "command" that you don't see very often outside of orchestral music, which is marked fp. Visually it looks like the normal forte or piano, except instead of referring to any time the segment is played, the first time through is played louder than the following time(s).

And those STILL aren't all the different branching commands. There are numbered brackets, slashes on note stems, slashes through some of the symbols I've mentioned above. Lots and lots of flow control.

And if that's not enough, there are instrument-specific "commands" for things like pedals (on a piano) or bow techniques (on violin) and slides (on guitar) etc.

So, personally I believe OP is correct in thinking written music (and tabulature) are programming languages.

Yes, but not all programming languages are Turing complete. Type 3 languages, for example, are not Turing complete.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact