48 comments

[ 2.7 ms ] story [ 51.7 ms ] thread
Musicabc has some really nice JS and Obsidian plugins that essentially allow you to create little scrapbooks of musical ideas in markdown that are also playable as sound and viewable as sheet music.

https://abc.hieuthi.com/

No Sonic Pi, which is a Ruby dialect?
Csound (I think v3) was the first music language I played with, back in the early 90s, under DOS even. Back then, running in real-time wasn't a thing. Generate a WAV file and play it after the program finished. Later, at the end of the 90s, I remember playing with CLM/CM, in common lisp.

But the most productive experience was definitely SuperCollider. I can only recommend giving it a try. Its real-time sound synthesis architecture is great. Basically works sending timestamped OSC messages AOT (usually 0.2s). It also has a very interesting way of building up so-called SynthDefs from code into a DAG. I always wondered if a modern rewrite of the same architecture using JIT/AOT technology would be useful. But I digress... SC3 is a great platform to play with sound synthesis... Give it a try if you find the time.

There is also literate programming for music, right? Just like Donald Knuth describes it in his literate programming approach? See for example the videos by Fauci etc. They say things like eh eh, pause then play music using items such as a pen, there is even a conductor. Very entertaining. Is that true? Or just my imagination?
Yesterday i used Claude Code to define and implement a YAML based DSL for playing backing tracks. I can ask an LLM to generate this DSL for any well known song, and it will include chord progression, lyrics, bass, drums, strumming pattern, etc. It's a go command line tool that plays the DSL via midi, and displays the chords, strumming patterns, and lyrics. Also does export to Strudel.
If you ever open-source it, I suspect a lot of musicians who don't think of themselves as programmers would still find it surprisingly approachable
I kind of want to create music programmatically but so far it has been way too difficult. I also can barely find anything useful via oldschool google search anymore. I am almost stuck like with MIDI here ...
It's missing "Strudel" and "tidal cycles"
Relevant to this discussion - my project Glicol (https://glicol.org) addresses this space. Currently working on a no_std rewrite, demo coming next year :)
A few months ago I outlined a spec for a new modern programming language inspired by LilyPond I call Capo. I haven’t done anything with it yet but the idea is that it compiles to MNX, which is the (still in development) successor to MusicXML, becoming a language that could be used as a scripting language in any program that supports MNX or as a standalone text-based music tool. Thought this group might find it interesting: https://github.com/Capo-Lang/capo
Can you give a rundown on how it differs from lilypond? What deficiencies you are addressing?
It’s mostly just for fun, but lilypond has a bit of outdated syntax in modern programming terms. The main difference though is that lilypond compiles to music engraving, whereas capo compiles to a more universal file format that can then be used to engrave, or inserted into another file, or opened in another program.
In order, the most popular ones of these are probably

* Max. It's built into a popular DAW, and is shockingly capable as an actual programming language too. The entire editor for the Haken line of products is written in Max.

* Pure Data or Supercollider.

* Csound.

Not ordering things like Scala or LilyPond that are much more domain-specific.

I learned programming with csound in the 90s but for me, Pyo and Librosa means there is no reason for a specialized language outside of python.

There is value in what has already been built for these languages but once you move beyond that, life is so much easier to just use python.

Cecilia5 is a great example of that being rewritten from csound to pyo.

Csound is funny because it's everywhere in the lineage, but relatively few people seem to arrive at it organically now
I really hope that Max becomes fully accessible in a text based format one day. It's so cool and I've spent a few months randomly through the years building neat plugins for Ableton but, for me, it would be so much stickier if it was code. Especially now with AI assistance, Claude can still be helpful but it hallucinates a lot harder when trying to describe visual code.
Max is basically a programming language already: message passing, scheduling, state, abstraction, even metaprogramming
I have been using ChucK for a long time. Like others here, I appreciate Max/Pure Sound but would rather use my text editor.

  Delay delay;
  LPF filter;
  Reverb reverb;
  Gain feedback;
  
  adc => delay => filter => reverb => dac;
  filter => feedback => delay;
There's a community in NYC called Livecode that hosts in person events for programming music and it's awesome