Skip to content

My New Programming Language

There’s a lot to take into consideration when a new programming language is being invented. Is there a demand for a new language, is there a specific niche that it will fill, etc. Out of curiosity in combining two things which I have a relatively natural talent for, programming and drumming, I am inventing a programming language.

My high school drum line had a warm-up titled “Morse Code” which, when translated, was essentially gibberish. I initially thought of writing my own cadence around popular phrases from books and movies into Morse code and dividing it among the instruments. While this is an intriguing idea and something I won’t soon forget it seemed rudimentary (no pun intended) and just was not unique enough. As I was taking a compiler class a few semesters back I began to think about how certain sequences are interpreted by a compiler. Initially I was going to use the Morse code interpretations for the ASCII into music. An implementation like this did not feel useful as it was only a different way of representing an already existing syntax. I decided to use my introductory knowledge of writing a compiler to create a programming language syntax which was based off of musical notation.

There are a surprising amount of control structures that we use in programming already built in to musical notation. The most obvious to me and one of the most useful for a language is the use of repeats as for loops. For the sake of maintaining playability as well as something that can be interpreted we have to take some liberties from both view points. An example is that function calls could be represent using codas that jump back to the previous section when finished. There is still a lot to conceptualize before I even begin writing any kind of formal specification. I don’t anticipate writing a musical operating system with this language but small, fun exercises would be interesting to be seen–and heard!

I haven’t yet thought of a name… PyDrum++ doesn’t exactly roll off the tongue. Stay tuned for more information as well as a full specification for the language. Eventually.

Post a Comment

You must be logged in to post a comment.