Posted on

What Language Should You Learn

I had a super good question posited to me the other day:

“From your point of view, what programming language would you recommend to learn for just leveling up in terms of audio programming?”

This is kind of a can of worms, but I’d like to open up on it here.

Your Goals & Skills

I think the easiest way to start answering this question, is by asking two others first:

  1. Have you ever written a line of code in your life?
  2. What do you actually want to do/create?

If you’ve never written a line of code in your life, but you’re interested and an audio professional, I wrote a book just for you.  Without a doubt, that’s where you should start.  You’ll begin in a software environment that you’re familiar with, quickly build some useful things, and have gain enough knowledge to hit that “I’m dangerous enough to break things” place.

Beyond that, we need to question what your end goals are.

Super broadly, I can say this – learning C++ will allow you do to the most “cool” audio-related work.

Really quickly, here’s a few reasons why:

  • The vast majority of audio plugins are written in C++ (VSTs, etc.)
  • “With great power comes great responsibility” applies – touching memory, threading, and timing allows you to do a lot more than a scripting language
  • A vast amount of media libraries at your disposal – including JUCE, SDL, and Cinder
  • You will be able to create plugins and extensions directly for tools like Unreal Engine, Reaper, Wwise, etc.
  • Most “heavy lifting” audio programming for games and entertainment uses C++

So without a huge assessment of your aims and priorities – I’ll encourage you that at some point, you should attempt to start tackling C++.

But, let’s entertain some other language use-cases…

  • C#
    C# is probably the easiest use case to “just get started” while also allowing you to do some meaningful work.  I realized the potential of what’s possible with tools programming by building custom SoundForge tools with C#.

    Unity Engine code is native to C#, which allows you to extend or even completely re-write large parts of the Unity audio engine like my friend Chris has done.

    You can also built lots of native Windows tools by using the naudio library.  By pulling metadata information you can visually check audio specs (bit depth, sample rate, file length, loudness, etc).  You can also record, encode, decode, and convert files using Naudio.

  • Python
    To be clear, I haven’t regularly used Python for audio-related tasks to date.

    However, if I were just wanting to jump in and learn DSP – there’s a whole book focused on Python for that.

    Additionally, Python will let you build custom Reaper actions, as well as plugins for tools like Unreal Engine.

  • Javascript
    Believe it or not, if you learn or already know Javascript, you can actually do some neat things.

    For example, howler.js is an audio library for the web that is more advanced and capable than just webaudio.

    You can also script custom FMOD utilities and actions with Javascript!

So, exactly where you should start entirely depends on where you want to go.  Realize that audio programming doesn’t even stop at these languages and tools.

If you’ve ever wanted to work on hardware, there’s plenty of neat arduino projects.  You can even make your own physical synth with a Raspberry Pi!

Hopefully this gives you plenty of ideas, now make sure you just go pick one and get started!

Copyright 2016-2017, Adam T. Croft, all rights reserved.