I’ve had numerous people ask me the following question:
“Hey Adam – what’s THE BEST language to learn if I want to get into audio programming??”
Though I’m entirely unqualified, this will be my attempt to answer that question for you.
The Real Answer
If you’re curious about this question, you’re going to hate the real answer. It’s real short, real easy, and provides no shortcuts. Here it is:
It depends.
What it depends on is entirely up to what you’re trying to do. Asking a question like “What’s the best language to learn for audio programming?” is kind of like asking “What’s the best guitar to buy if I want to play rock music?” or “What’s the best DAW to use for sound design?”.
To some extent, programming languages are tools just in the sense that a guitar or a DAW are tools. You can do some audio things with Python, or C#, or C++, JavaScript, or even UE4 Blueprints. But, they don’t all occur the same way and some are easier to use in certain contexts for certain goals than others.
In other words, if your goal is to re-create Black Sabbath’s original guitar tone – you can do it with other guitars, but the easiest way is to straight to a Gibson SG.
The funny part with programming audio-related things is this – at some point most everything gets down to utilizing C++. For example, you can build a pretty incredible audio system in C# based off of Unity’s stock audio engine. But DSP plugins for that audio system are done in C++. In fact, Unity’s audio engine itself is in C++.
Does that mean you need to run out and learn C++ and DSP math to program audio? No – because it’s entirely dependent on what you want to do.
What Do You Want to Create?
Okay, so let’s do a quick hit list of the things people most often seem to want to do, and give you an idea of where to aim:
I want to make DAW audio effect plugins
This is clearly the most common “cool idea” that people have – with good reason, right? You use plugins all the time as an audio professional – wouldn’t it be cool to make one?!?!
You can (and should consider) starting just about anywhere to learn DSP. You can use playgrounds like ChucK, Max, Pd, Blueprints, and SuperCollider to learn how to affect audio signals in ways that range from very easy to “I’m directly changing numbers in the audio buffer with math”.
But, eventually – this is the spot where you’re going to have to use C++ and DSP math. I wouldn’t even suggest doing a free online C++ course for this. At minimum go buy yourself a Udemy course or two and make some neat applications to build your way up to it.
Today, JUCE seems to be by far the most talked about utility online to make plugins. It provides a cross-platform framework and will build all of the latest plugin formats as well as audio, video, and standalone applications.
I’d suggest, however, making sure you’ve got a pretty good grasp on C++ and digital audio concepts before jumping into JUCE.
The only exception to this rule that I’m aware of is the Faust programming language – which allows you to program in a local or web environment, and will export a plugin for you to use as well. I can’t speak too much on this, as I’ve only gotten a small introduction to Faust.
I want to modify and expand an already existing audio engine
Both Unity and Unreal Engine 4 are fantastic places to play with digital audio in an interactive environment. With both, you can take their stock audio engines and build upon them in whatever way suits you and your application.
When I was getting used to Unity, for example, I “re-created” some of Wwise’s feature set in stock Unity so I could learn how a system like that would work. It was a great learning experience.
Within Unity, you’d be leaning heavily on C# to do this – as pretty much everything in Unity-land is C# based.
With Unreal Engine, you’ve got two different options – Blueprints, or C++. Despite the fact that I don’t love node-based visual scripting and I’m not super well versed in Blueprints – that’s where I’d tell you to start. To my understanding, Blueprints are meant to be easy to pick up, learn, and also be extremely powerful to use – even with the audio engine. Once you’re comfortable with Blueprints, at that point you could start moving over to getting comfortable with written languages and/or begin modifying things in Unreal with C++.
I just want to make noise
Sometimes, the best place to start is to just start making noise and playing – just like stepping up to any piece of audio gear and fiddling knobs to see what happens.
There are a lot of different languages that you can use as playgrounds just to learn to mess with audio in a digital environment: ChucK, Max, Pd, Faust, Blueprints, SuperCollider, and Sonic Pi to name a few.
If you’ve ever started wanting to learn to program and wanted to play with audio – I think these languages are a fantastic, non-intimidating, very safe place to start.
What about Python, Lua, etc?
There are plenty of other languages that you can use to work with audio – and I’d highly suggest it if you’re already used to them.
Python and Lua, for example, can be used to make custom Reaper actions. Python is also heavily used in machine learning – so if you wanted to approach machine learning and audio, that would be a great place to start.
And if you’re used to web development, JavaScript has lots of audio-related libraries to use. Plenty of audio-related web applications have been made with Javascript, and you can even write your own external Wwise or FMOD tools with it!
Get to it!
Hopefully this has given you plenty of ideas on where to start. Now it’s your job to get to it!
Before you go – a few additional things you shouldn’t forget:
- C# Implementation with Wwise and Unity is on sale until the end of Friday. So 4 more days.
- My entire store is on sale (with the exception of the C# course) until the end of Friday too.
Alright – I’m excited to see what you make!
Copyright 2016-2021, NIR LLC, all rights reserved.