Music and Coding


I’m curious to know if anyone here has ever done any coding related to making music, be it scripting in a daw or synth, coding custom plugins with something like JUCE, or playing around with any languages like CSound or Supercollider.

Is anyone in the forum a hobbyist or professional coder?

On a somewhat related note, I just learned that Logic has a MIDI module called Scripter, which lets you process incoming MIDI using JavaScript. I’ve been using Logic for like 10+ years and just now found out. Learn something new every day I suppose.


I’m not a professional, but I taught myself to code a few years ago and use it all the time (probably on a daily basis, honestly) for music and art projects. It’s what supercharges my shit, next to modular.

I’m hitting snags in the DSP algorithm department because my math skills suck and I never went to high school (long story), but as far as scripting, logic and using libraries for the heavy algorithms go, I never really regret knuckling down and at least getting comfortable with the stuff.

There are scripting APIs everywhere, though, you just need to look harder for some. FL Studio, Renoise, Falcon, most modular systems that are worth anything and well beyond (including quite a number of DAWs like Reaper and Mixbus, or literally anything on Linux) all have stockpiles of resources you can tap into, sometimes even with IDEs that fill out 95% of the code and UI elements for you. And that’s not even to mention some of the other great coding applications for music, but I’ll stop there to avoid clogging things up. I could go on forever :smiley:


Your enthusiasm is most welcome, and I’m sure I could go on for a long time as well.

To clarify, I’m actually a software engineer in my day job. This skill has been slowly creeping into my music production over the years, and I’ve played around with scripting in falcon, and supercollider a fair bit.

recently, I started exploring making VST’s in JUCE. Nothing crazy to show yet, still getting my bearings, but i have some ideas in my head that i want to try and make a reality.

Modular is still not something i have now, but I think that’s going to change soon. :slight_smile:


Hell yeah. I think I’m kind of doing this from the “help me, C++ is scary!” end – I’ve been trying to get some stuff up and running in Blue Cat’s Plug’n Script but still having a hell of a time digging through formulas and trying to actually implement them in code. Soon enough I’ll stumble upon some library and just use that.

The easiest one for me so far to actually implement is Voltage Modular’s Designer (it’s all free, don’t let them trick you), because they hand you a shitload of oscillator, filter and distortion objects to play around with right off the bat. I think I’ve made over 30 modules so far and some of them proved to be quite useful for my rigs :smiley:

I kind of want to strengthen my knowledge as a coder for this, though, just so I can tap into and convert larger libraries down to small projects (like modules). Processing libraries like Beads and Minim use UGens, where I need double data types, and converting over is where my brain shuts down. I can get some of the (Processing library) generators to work in VMD (natives work fine), but implementing the FX correctly is a bust due to my lack of knowledge. Need smarter brain :sweat_smile:


The good thing is for learning, if you know how to prompt chat gpt, then it’ll spit out code in whatever language you want. Then you can piece it together.


From what I can tell so far, it only really knows publicly-available algorithms and never knows how to implement them in the way you want. I’ve tried to get it to write converters (for the purpose I mentioned) along with even basic effects (like comb filters) and it fails every time. Once me and the bot refactor it a million times, it definitely runs without errors (although it’s like trying to get a kid to write code to begin with) but the effect isn’t even close (usually it just ear-rapes the shit out of you and does nothing else).

I think there will probably come a day when that stuff actually works, but in my experience it really only works for those generic questions that everyone has answered a million times that you can basically just copy and paste from Stack overflow if you really need to. It’s probably really good for people who can’t code to begin with (although I think that’s probably a bad thing over all, but who knows), but it’s not even remotely close for DSP. Even if you literally feed it an algorithm from Beads or Minim, it’ll never be able to connect the dots.

(That is the part where I’m failing, though, so your post is still correct. I just feel that if I were a little better at algorithms in general, just going on Wikipedia would be more useful than using a bot)

The only real successes I’ve had were processing images with the Processing language. It wrote me convolution matrices, edge detection and all sorts of crazy shit in the exact way I wanted, but that’s because the information is just chilling on forums and elsewhere in massive quantities and nothing had to be converted from one guy’s data structure to the next. But even after that, I got a crippling feeling of, “I need to learn these algorithms”.


I’ve done some audio coding, though it’s tended towards standalone apps or embedded programming vs VSTs, mostly in C/C++ with a bit of ASM. I’ve looked at JUCE several times but having to jump through hoops to get it set up and learning the API has always stopped me from messing with it in lieu of just doing Windows native code (which is a stupid, horrible, terrible experience, but once you have a working API/framework you can just keep reusing it).

I have a feeling that just using the VST3 SDK would be about like working with platform audio - framework out your own API/boilerplate over the SDK API and then just keep reusing it. It looks like JUCE does all that for you, as well as providing an IMGUI interface over it to easily tweak numbers. If you’re not wanting to build out the VST3 abstraction, JUCE is probably the simplest way to get up and running.

I’ve found to be super handy for visualizing what a given algorithm is doing and how changing the formula alters the output. It’s not going to fully replace understanding the math behind it, but might help you intuit what’s going on. I actually have a background in mathematics, but my last harmonic analysis class was over 20 years ago so sometimes it’s easier to just watch the pretty lines move around than try to parse a crazy formula for things I barely remember :smile: