Live data from Hacker News

Ask HN: How to get started with audio programming?

news.ycombinator.com

41–50 of 123 posts

Re: Ask HN: How to get started with audio programming?

#42
Cycling 74's Max is a really good way to get into audio (and visual) programming. It introduces the concepts of programming and DSP whilst still keeping things beginner friendly. It's a lot more beginner friendly that something like JUCE which, while super powerful, has a much steeper learning curve and requires you to know C++. Major downside is that it's not suitable for making full audio plugin products, rather I would use it to prototype a plugin, the DSP logic and even the UI before writing any text-based code for a VST/AU.

You can absolutely make a nice synth that takes input from pretty much anything you can attach to a computer.

And as everyone else has said - theAudioProgrammer is good too.

(Edit) - Pure Data (PD) is an open source alternative to Max which is free. I've heard people recommend it but never used it myself.

Re: Ask HN: How to get started with audio programming?

#43
Hi,

I started with Csound and Cabbage framework[1] which I used to create some VST plugins.

Then I moved to javascript lands (as everyone already has runtime called web browser) and I am creating sort of DAW using webaudio. I used Tone.js, but it was somewhat confusing, so I started my own library[2].

It's not finished yet but I have already nice and usable demo - comb organ playable with computer or MIDI keyboard with built-in "tape recorder"[3]. Good news is that is open source so you can actually stole some ideas from me.

[1]: https://cabbageaudio.com/

[2]: https://github.com/severak/cyber-music-studio/blob/main/js/h...

[3]: https://severak.github.io/cyber-music-studio/regenschori.htm...

Re: Ask HN: How to get started with audio programming?

#46
Browsers have a very accessible API for audio programming now[0]. Comes with the benefits of being platform independent, using JS(okay, this as a benefit is arguable to some), and easily distributable(perhaps too easy since you can't hide your source code either, unless you do some form of SaaS and introduce latency).

[0] - https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_A...

Re: Ask HN: How to get started with audio programming?

#47
My advice would be to start with JUCE. It's a great framework for audio development, and has a lot of example projects for making plugins and hosts. Audio programming is definitely tricky and something of a black art. Even making a simple square wave synth that doesn't sound crap is surprisingly difficult, because of unintuitive artefacts engendered by the sampling theorem. (In a nutshell you have to make the square waves wiggle a bit for them to sound good, otherwise you get lots of high frequency garbage which sounds metallic and ugly.)

Ross Bencina also has some good articles about the realtime aspect. Basically, you shouldn't use locks and should become intimately familiar with ring buffers :)

Re: Ask HN: How to get started with audio programming?

#49

My advice would be to start with JUCE. It's a great framework for audio development, and has a lot of example projects for making plugins and hosts. Audio programming is definitely tricky and something of a black art. Even making a simple square wave synth that doesn't sound crap is surprisingly difficult, because of unintuitive artefacts engendered by the sampling theorem. (In a nutshell you have to make the square…

One other comment. There are two rates: audio rate and control rate. Audio rate is "for each sample". Control rate is roughly "once per frame" i.e. once per buffer.

If you want to do anything useful you'll need a GUI which can control the parameters of the audio plugin. The GUI will communicate with the audio thread at control rate. The audio thread will usually pick up messages from the GUI via a ring buffer. And by the way, this can happen in reverse, e.g. for level meters, where you do a moving average of squared amplitude (RMS), and output this as a control rate. You can use ring buffers for this, but another approach is to use atomic variables. And in x86 architectures you can actually even use just regular variables because of its strong memory architecture.

Re: Ask HN: How to get started with audio programming?

#50
I watched CppCon 2015: Timur Doumler “C++ in the Audio Industry” https://m.youtube.com/watch?v=boPEO2auJj4 not long ago and enjoyed it. He was a developer at Roli working on synths and he goes through real time strategies to keep the response time under around 30ms IIRC
Post reply on HN