Music software frameworks
and programming languages, for music
August 22, 2016 — January 5, 2022
Nothing sounds quite right? Roll your own audio! Emphasis here is on quickly prototyping things; What’s the fastest way to try a new algorithm, etc. Good enough for installations, not necessarily for shipping to punters. (Some here are potentially production-grade, though, e.g. Juce.)
1 General
The Audio Programmer is a blog and podcast about general audio programming stuff.
2 Whole languages
Audio-specific programming languages. Why do people invent new DSLs for audio? This is a terrible idea. Anyway, there are some.
tl;dr If you must use a musical DSL, Csound might not be hip, but it’s the one that avoids the more horrible pathologies of its bitrotten competitors. You’ll miss some sequencing capabilities of supercollider, but not the debugging experience, or the inconvenient GPL licensing. Possibly overtone or Tidalcycles could get you there too.
For a satisfying rant/overview see Michael Gogins list which includes a few I missed.
2.1 Supercollider
Supercollider, dealt with elsewhere is an audio application and programming language. It comprises two parts, a backend synth scsynth
, which is pretty good, and a front-end sequencer sclang
, which looks good but upon closer inspection is held together with tape and spit. Fortunately, because of this modular structure you can use the scsynth
and ignore, to a greater or lesser degree, sclang
.
Note that all of these share a common defect, which is that because it is purely GPL’d, it is legally difficult to release real software using it or put it on iPhones etc.
2.1.1 Sonic Pi
Supercollider+ruby=sonicpi
Sonic pi is a flagship livecoding music and general coding education language. Vexingly, because it’s so excessively friendly that it’s hard to find any concrete specs or API docs. How do I even know it’s ruby? I inspect the code from the examples. Then I confirmed by deducing from the manual developer instructions. But the word “ruby” is not mentioned anywhere. There are some powerful ideas in here, like the live sequencing loops, but it’s hard to excavate the advanced instructions you need for advanced usages, and the FX presets will annoy the crap out of you real fast.
2.1.2 overtone
Supercollider+clojure=overtone
The archetypal hipster FRP language, clojure, has a functional composition library to work around supercollider’s sclang pathologies, called overtone.
2.1.3 Tidalcycles
Supercollider+haskell=Tidalcycles
.
Thanks be the excellent Alex McClean for Tidal, which, IMO, does not get all of sequencing right, but does get a useful subset of sequencing sensible. See Tidal.
2.1.4 foxdot
Supercollider+python=foxdot
Foxdot is a great hack, even though it’s not my own preferred style. Discussed under art python.
2.1.5 supercolliderjs
supercollider+javascript=supercolliderjs
supercolliderjs circumvents sclang
oddities by replacing it with javascript. Created by one of the supercollider core developers. Put another way, it is an alternative javascript audio system (albeit not for the browser). This is attractive if you want a client-server infrastructure with SC as the server and browser javascript GUIs However, the community is small, the hacks are fiddly and the docs are incomplete so I spent most of my time with this thing just being confused.
You need to link up various bits to make it go:
Here, try a supercollider-browser example
2.2 Csound
Csound is another supercollider competitor with more open licensing, and more sustained development. It’s useful enough that it has its own page. The especially good features are that it’s small, liberally licensed, and designed for clean foreign function interfaces, and thus it works seamlessly with other languages, unlike supercollider which eschewed that by design.
2.3 Chuck
chuck is a recent competitor to supercollider; still not that actively developed, surely in part because their source-management is AFAICT innocent of all innovations in collaborative source code since the 90s, so contributing is too tedious for anyone to bother. Get it together and get a public github URL, Princeton hermits.
3 DSLs
3.1 SOUL
SOUL (source) is a mini-language and API for local compilation of DSP algorithms, including to browsers etc. It was backed by substantial industry interests, although I suspect it is now dead in the water. There is a famous app, tahti, which compiles to run in the browsers (!) which demonstrates why it is (could have been?) nice.
3.2 Faust
Faust is a functional language (in fact a DSL) thoughtfully designed to some qualms I have about niche languages, i.e. it is a DSL which compiles DSP code to other mainstream languages, such as C++ and javascript; as it generates normal code in real programming languages I listed it here so as to avoid slandering it by association. It has its own page now because it is complex and useful enough.
3.3 Reajs
ReaJS is a plugin library from Reaper DAW that allows custom VST design using their weird custom language. cul de sac.
4 Audio libraries for mainstream programming languages
Wait what? You can just use a normal programming language with a lovely IDE and a sensible debugger, and still make music?
4.1 Plink
is an environment for hosting AudioUnit instruments and effects and allowing them to be played and manipulated in code. It is still under development.
4.2 JuliaAudio
JuliaAudio does audio processing in Julia. Notable PortAudio.jl makes it real-time.
4.3 STK
STK is a C++ library implementing various synthesis algorithms in a bareback style, with a special emphasis on physical modelling algorithms for virtual instruments.
4.4 Maximillian
maximilian is Mick Grierson’s C++ library for doing audio graphs, and seems to be a pragmatic choice for many artists. (Direct source link)
4.5 Juce
Juce seems to be the cross-platform audio+GUI of choice and can host faust code; so that’s nice. I wonder if it can plug into maximilian?
Raffael Seyfried wrote the best tutorial for this that I have seen while developing his plugin GRNLR.
The modern tutorials are getting pretty good. See
4.6 Beads
Beads brings realtime audio to java. Here’s an intro. It’s an excellent no-fuss way of creating musical audio rapidly. Recommended if you handle java. Disclaimer: I work with the creator of this library author, Ollie Bown, and am therefore biased.
4.7 OpenAL
Light spatialization is the specialty of the gaming-oriented open-source OpenAL.
Comprehensive spatialization is the specialty of the open-source SSR.
4.8 Incoming
Python options listed under python audio.
4.9 Protoplug
protoplug (source) looks cool.
Protoplug is a VST/AU plugin that lets you load and edit Lua scripts as audio effects and instruments. The scripts can process audio and MIDI, display their own interface, and use external libraries. Transform any music software into a live coding environment!
Rationale:
The scene: There are very few on-the-fly scriptable VSTs out there. In fact, the only real contender is ReaJS. And yet, the scene of live coding is rapidly expanding.
The applications: Study, research and prototyping are good causes, and this is fast enough that you can also use it for real-world applications.
The language: We’ve seen enough raving accounts of LuaJIT’s now legendary performance, so let’s try it in the very demanding field of realtime audio. So far, the main slowdown is that all floating-point operations are done with double precision. This does not always have an impact, but it can be slower than vectorized SSE float processing.
4.10 Gstreamer
gstreamer is a generic multimedia pipeline library that seems to pop up in lots of neat projects.
5 Patchers
Graphical dataflow programming languages, a.k.a. patchers. Particularly close to how we design audio hardware i.e. modular synths are programmed using actual physical patch cords. A specific kind of DSL, with a visual functional graph interface. I’m not fond of patchers, although I do not mind patcher-style visualisation. But if there is only the graphical representation I find it irritating. Some of the patchers systems have both — faust, and puredata (the latter it is pure patcher per default, but you can kind of force it into being better). Also supercollider and chuck are usually classed as patchers for reasons of I assume marketing, but AFAICT patching style visualisation is broken for both these, so I don’t know what’s going on in this world anymore.
There is a hub of patcher enthusiasts at patchstorage.
5.1 MaxMSP
MaxMSP, the expensive, bloated, pretty, popular one, with crashy-but-convenient Ableton Live integration. It is now called Max, which makes it impossible to google.
5.2 Puredata
Puredata, the slim, clever open source alternative to MaxMSP, with the remarkable feature of running on smartphones. It’s neat, but there is much too much clicking involved in it in the default setup, and awful abstractions. Puredata by itself is too barebones to do anything interesting with; It’s more of a platform than an app. Get some higher-level abstractions e.g.
integra live is a puredata frontend and library that promises unified pluggable components. They got shafted by committing to Adobe Flex, whose instability as a platform has put the project at risk, but it does look like a rare example of a good UI for an open-source project.
droidparty runs your patches on android devices
rjlib. Download: chr15m’s version See, e.g. my own RjDj scene “Feral”. This is old but good
AudioLab is a fancier similar library of abstractions.
pisound has sweet puredata integration
The entire raison d’être of PD got extra raisins with these next generation, free, open-source, smartphone-friendly apps: MobMuPlat and MobMuPlatEditor. (Pity about the name.)
MobMuPlat is a standalone iOS+Android app which hosts and loads from a list of available works. Creating your own work consists of two parts. First, creating a graphical user interface (GUI) with the MobMuPlat Editor (macOS and Java versions available); second, creating the audio engine using the graphical programming language Pure Data (PD). With both of these applications open, and data sent between the two, you can simulate the app behaviour on your laptop/desktop. Once development is complete, just drag the two saved files into the “Documents” folder of iTunes, and they are uploaded to your iOS device and can be opened in the MobMuPlat app. (For android, get the files onto your device storage folder anyway you like, then open them in the MobMuPlat app).
MobMuPlat can do synthesis, sampling, MIDI, OSC, networking via local wifi, query and set hardware characteristics like tilt/compass/camera flash, display images and vector graphics, be used within AudioBus (iOS only), take joystick/gamepad input (Android only) and much more.
However, Csound also has this facility, so YMMV.
6 Noisecraft
NoiseCraft is an open-source, visual programming language and platform for sound synthesis and music making, with the goal of creating a community for the open exchange of musical ideas. The design is loosely inspired by PureData, Max/MSP as well as other visual programming languages. NoiseCraft is built on technologies such as the Web Audio and Web MIDI APIs, and runs in a web browser. The plan is for the app to remain free to use and ad-free for the foreseeable future.
maximecb/noisecraft: Browser-based visual programming language and platform for sound synthesis.
Example: April 14th (Aphex Twin) additive sines “vocalized”.
6.1 ecoSYSTEM
Monologx’s ecoSYSTEM is… am not sure. 🚧TODO🚧 clarify
6.2 Reaktor
Reaktor, the commercial synth nerd product with amazing synthesis but truly tedious DSP programming by point-n-click and no binary interface.
6.3 Executable sound
Left-field entrant, the incredible open-source executable sound, which has an elegant approach — it pumps out demo-scene-style DSP executables.
There are lots more, some of ’em even more expensive than the usurious Reaktor. Everyone likes this way of doing things, and the punters seem happy to cough up cash for it too.
See also Faust, above, which technically fits in this category but Does It Right, in terms of having a real language as well as a dataflow visualisation, and oh p.s. being free, and incredible. However, it doesn’t have good instrument support, (voice allocation, polyphony, VSTi compilation targets) so I don’t actually use it; I merely admire it from afar.
7 Other
MrsWatson was useful: given a VST, a VST preset and a MIDI and/or audio file, it will render the output of said VST. Command-line. Open-source. Discontinued.