Best coding languages to learn to design synthesizers/effect boxes

I’ll suggest another rabbit hole here, it’s more like visual coding but coding nonetheless.

1 Like

If you learn Lua and SuperCollider you could make scripts for Norns/grid. The hardware problem is already solved, and there are hundreds of open source community scripts to learn from.

3 Likes

Best to learn for industry work? C++ (with or without JUCE), Rust, maybe Matlab/R?
best to learn, have fun tinkering and learn programming with DSP through higher abstraction? Python, Max, Supercollider, other languages mentioned above.

Understanding your goal and level setting with yourself is key. Sounds like you’ve done that a bit which is great.

I’ll be happy to post some tutorials and ebooks when I get back home.

The DSP and math were a HUGE hurdle for me. I applied for a job where I would be moving from full-stack web to doing web with “light” DSP, and merely dipping my toes into some of the python tutorials had me realizing I was in way too deep. Without more experience in calculus, linear algebra it was a moon shot for me!

3 Likes

@oldbills
This programming adventure is something I’ve started recently. I more interesting in MIDI than DSP, but learning coding is learning coding. I don’t know much past building some arduino hardware/code.

The Audio Programmer discord community has been a HUGE help. There’s 100s of people there willing to help n00bs like me get the footing, discuss what frameworks would be best for me to use or avoid, etc. they cover pretty much every language, framework, and end user application. The place has been indispensable for me.

They also have a book, which even people not in that discord have recommended to me, but it’s mostly audio based, where as I’m headed the MIDI direction.

I recommend checking it out. Just lurk for a few days, and you’ll see……
Just don’t get intimidated by all the brainiacs there and think you’ll never get on that level. They are all super chill w/ no egos.

1 Like

I appreciate that. I remember first getting on this forum and tryin to figure out how to assign midi channels and simple stuff to make an Octatrack simply make noise and the Elektronauts community was super helpful.

So will definitely check out their discord thanks :slight_smile:

Not a direct answer to your question but I’ve always really like this talk where Steve Duda explains how he got into making plugins.

1 Like

There’s also their YouTube which has a gazillion thing a too, from beginner to expert, to full on JUCE tutorials, etc….

https://www.youtube.com/@TheAudioProgrammer/videos

He’s very inspiring. Thank you for sharing!

I dived into the C/C++ world many years ago for the purpose of doing specialised data processing tasks. Once you think that you know how to wield that newly-acquired power, it is highly tempting to do it all by yourself and to reinvent the wheel. All of the sudden, all you can see is solutions, there are no more problems that seem insurmountable. It’s a great feeling. But there is also a huge price to pay, both to get there and to stay there: time.

Luckily, today, and certainly thanks to this experience, I am able to recognise when to do a programming job myself and when to hand it over to a specialist.

1 Like

I’ve been a programmer my whole adult life and involved in electronic music just about as long, and the last thing I’d want to be doing is mucking about in C++ trying to do anything related to audio. It’s a recipe for pain & frustration especially if you’re new to writing software. The maths and DSP alone is a vertical cliff of learning.

I’d start with a high level language designed for audio, such as Sonic Pi, or PureData (but it running used to be quite a challenge). There’s also SuperColider but personally, I never really got on with it

If you’re only interested in MIDI, then you can use JavaScript and the Web MIDI API to easily send/receive any sort of MIDI message. You can build sequencers, arps, generative thingies all straight from a HTML page and vanilla JS. I wrote a MIDI toolkit and debugger like MIDI-OX using this API.

There’s also the Web Audio API which is surprisingly powerful. I’ve used it to build trackers and single cycle waveform generators, again using nothing but JavaScript

8 Likes

Still gotta know your platform your coding for. WebMIDI doesn’t exist if you’re building iOS apps. :upside_down_face:
(At least I know it doesn’t work in browsers that use it for device configuration)

maxSDK is written in C.
PureData is written in C.
JUCE is written in C++
QT is written in C++
SDL is written in C.
Raylib is written in C.

and many many more in C, and with it of course available to code with in C++

all GPU accelerated math API and similar techniques are usually written in C.
And python is nothing without C.

hence this information C is what you’d love to master, then C++ is even easier.

honourable mention: Lua is fun, even Rust can be but you will discover how heavy C related all those are… (LUA is written in C by the way)

other stuff.
WebMIDI exists for iOS if you actually code it, I’v done just that, in Swift targeting Webkit.

if you plan a big project then certainly the UI becomes a problem… cause if the environment shall be Unity, aka 3D gaming engine just as example, then C-sharp (C#) is needed, and then yet again you very likely end up writing C for the real stuff.

honestly C is not that hard, just often underestimated because programming still means you have to keep your discipline how you apply coding principles, safety, design patterns, fallbacks and if you can maintain and adapt to many different use cases. Then interoperability becomes a major goal, and for that C (see how i advertise it?) is really a big deal and for any platform available.

1 Like

A fun device to start exploring music coding could be this one:

2 Likes

I wouldn’t dream of targeting a mobile device with these APIs
Apple in general lags so far behind the adoption of most modern web APIs, I’d steer well clear of Safari also

You probably should look into RNBO which allows you to go from Max (visual programming and debugging) to code (C++) - https://rnbo.cycling74.com/

Ableton has some examples of DSP you can run on multiple platforms: web, mobile and embedded.

I want to add that C++ is the most supported language for audio but it can be painful getting started with it mostly because of compiling, memory safety, debugging the verbose errors, there aren’t like standard tools like languages like Rust, Go or Swift for example.

For me I had to learn to code audio using the most « bare metal » approach.
Meaning Linux, a compiler, debugger, and minimal library.
Because it make things clear and manageable in my head.
And using big framework make things way more complicated than they are for me.

Really depends on each people. Some can use large library, toolkit. Some can directly code on top of a VST library. I think each people are different. Maybe ask yourself what make things easy for you to learn.
Because first it need to be fun if you want to stick on it.

For example, one of my first audio code was just generating a sine, saw, triangle in a 16 bit audio file, and pushing that to my sound card. And honestly I feel like a real boss doing that and applying a pitch lfo on top of that :sweat_smile:

3 Likes

A small stringsynth made in GO

Not saying it is the best tool for everyone, but some say its best for them (for everything)

Writing code to get a computer to do something and developing audio algorithms are two very different skillsets that both take a lot of time to study and master.

The latter is probably best done in something like Max/MSP, Pure Data or even Reaktor.

The former: it doesn’t really matter.

If you absolutely must combine learning the two, which as a lifelong programmer I’d seriously recommend against, you could take a look at Juce. It’s a framework for developing audio applications that takes care of the low level stuff for you (and that really isn’t fun or educational anyway). This allows you to at least focus on the stuff that makes sound.

Drawback to Juce it’s in C++, which is not a newbie-friendly language. It may be possible to use it from other languages, but you’d better not - if something goes wrong, you’ll be tearing your hair out wondering whether it’s your algorithm, your programming skills or the connection between Juce and your programming language. This is unpleasant for professionals like me, let alone beginners like you.

TLDR: don’t, but if you must: Juce in C++