5 Great Open Source Music Programming Languages

Image taken from Hydra – an online platform for live coding visuals

This post explores the world of music programming languages. By the end of this article you’ll have access to five free audio applications, videos of musical performances, and some great tutorials. Hopefully you’ll know a little more about music programming languages too.

What are music programming languages?  

Music programming languages are computer languages that are optimised for sound production, sound synthesis, and algorithmic composition. They are used for music, sound design, acoustic research, and education. They can have text-based user interfaces or graphical-user interfaces. They are excellent standalone tools, but they can also be integrated into Digital Audio Workstations e.g. Max for Live.

Why are music programming languages exciting?

A training in music is a nice skill to have, but it can sometimes feel restrictive. The musical rulebook of audio programming has not been written yet; the lack of any well-established theory makes the process of writing code, to create sound, incredibly liberating. There are thriving online communities that are devoted to the philosophy and aesthetic of these languages.

The engineering, problem solving, and design facets of audio coding are also extremely rewarding – innovative digital instruments and signal processors can be built with these platforms.

The 5 Programming Languages

Sonic Pi

I’ve started with Sonic Pi as it’s a good language for beginners. It has a text-based user interface (TUI). You input a set of instructions as text (source code), the platform converts these instructions into machine code and then outputs them as an audio signal.

Sonic Pi’s creator, Sam Aaron, originally intended it to be a tool for teaching children about Computer Science: “Rather than teaching them sourcing algorithms and binary arithmetic, let’s give them some synths and beats” (Winkie, 2019). It’s syntactically succinct and thus lends itself to “live coding” – the practice of writing source code to create improvised music/visuals within a performance setting.

The tutorial that comes with Sonic Pi is well structured and clear – it serves as a solid introduction to Sonic Pi, while also introducing some general music programming concepts.

The application can be downloaded from the Sonic Pi website.

Pure Data

Next up is a platform with a graphical user interface (GUI). If you play an amplified instrument or make electronic music, Pure Data (Pd) is easy to understand conceptually. You have objects that generate and process sound, and controls (buttons, sliders etc…) that modulate, map and scale data; you connect objects and controls with patch chords – imagine you’re connecting a synth to a signal processor and an amplifier, but virtually.  

Visuals can be created in real-time in Pd with the Graphics Environment for Multimedia (GEM) plugin.

Pure Data is similar to commercial software like Max and Reaktor. In fact the creator of Pure Data, Miller Puckette, also created Max.  

The application can be downloaded from the Pure Data website.

Doctor Rafael Hernandez has a helpful set of tutorials for beginners. I recommend watching Really Useful Plugins synthesis tutorials if you already have some knowledge of the platform.

Here’s an algorithmic beat created in Pure Data.

SuperCollider

SuperCollider is a text-based language, but it’s also possible to construct graphical user interfaces. It’s a tremendously powerful platform. There’s a dedicated community of composers, programmers and scientists, that use and further develop the software.

Due to the capabilities of SuperCollider, programming languages have been built that communicate with SuperCollider’s robust audio engine, through the Open Sound Control (OSC) protocol. TidalCycles and FoxDot are two notable examples – code inputted into these platforms creates musical events and patterns which are sent to SuperCollider and converted to audio. They are great for live coding and real-time composition.

SuperCollider can also function as an excellent standalone live performance tool, but its syntax is more verbose and complicated than the aforementioned platforms.

The application can be downloaded from the SuperCollider website.

I recommend following Eli Fieldsteel’s tutorials if you’d like to learn SuperCollider. He’s a lecturer at the University of Illinois, who live streams his lectures and shares his problem sets via YouTube!

Here’s a performance with Monome Norns, a digital instrument that uses SuperCollider code and the SuperCollider engine.

Csound

Csound is the oldest language on the list. It’s a text-based language, but you can build GUIs in it too. Although it was traditionally used for electro-acoustic music, it’s a versatile platform which can be used to compose any form of computer music.

Csound began as a non-interactive score-based language, but now it’s often used in a real-time setting and can be used for audio-visual performances. Designers and engineers use it to create software, hardware and web applications.

The application can be downloaded from the Csound website.

ChucK

ChucK is a text-based language that’s noteworthy for its ease of use and real-time performance capabilities. Ge Wang, ChucK’s creator, states that its pioneering “programming model allows programmers to flexibly and precisely control the flow of time in code” (Wang, 2008).

ChucK can be integrated with Audicle, “a specialized graphical environment designed to facilitate on-the-fly programming, to visualize and monitor ChucK programs in real-time, and to provide a platform for building highly customizable user interfaces” (Wang, 2008).

Ge Wang has used ChucK with the Stanford Laptop Orchestra, which he founded. Here’s a link to a performance.

The application can be downloaded from the ChucK website, and you can find Audicle here.

Conclusion

These are five great languages for music and sound design. They all have their strengths: Sonic Pi offers ease of use; Pure Data’s graphical user interface can help musicians to visualise the process of coding; SuperCollider is a complicated but highly rewarding powerhouse of a language.

So what do you think of my list? Do you agree? Do you disagree? If you think there are some important ideas or languages I haven’t mentioned, please let me know.

And to conclude here’s a live coding performance recorded during lockdown by Yaxu (music) and Hellocatfood (visuals). The first eight minutes of this are really special. An intricate network of synth and drum patterns gradually build and evolve. Hope you enjoy it.

References

Csound. (2020). Csound: A Sound and Music Computing System, Retrieved from https://csound.com/index.html

Wang, G. (2008). The ChucK Programming Language: A Strongly-Timed, On-the-fly, Environ/mentality, Retrieved from https://www.researchgate.net/publication/259326122_The_ChucK_Programming_Language_A_Strongly-Timed_On-the-fly_Environmentality

Winkie, L. (2019). That Music You’re Dancing To? It’s Code, Retrieved from https://www.nytimes.com/2019/10/04/style/live-code-music.html

Leave a comment

Design a site like this with WordPress.com
Get started