Page 1 of 1

Real time audio programming (with RtAudio)

Posted: Wed Sep 16, 2020 2:23 pm
by oscillator
Hi all,

I am working top to bottom in learning computer music. Started with DAWs, later making CV/Gate controllers with Arduino, C++/RtMidi/fluidsynth, and recently Mozzi on Arduino.

Now I would like to code from the ground up: Programming oscillators, envelopes, filters, LFOs. Not using any prebuilt stuff. Just to learn, and understand.

After some research I settled on RtAudio. I understand the callback function, which seems like a standard paradigm in audio programming.

But the RtAudio documentation is not very exhaustive. So I ask the community for help with good tutorials, not necessarily RtAudio-focused, on making oscillators etc.

Also good literature. I saw this thread: viewtopic.php?f=44&t=20207. The MIT Press book The Audio Programming book looks useful. Is it?

An additional goal is to turn all my adventures into a tutorial like I have done before.

Thanks in advance!

Staffan

Re: Real time audio programming (with RtAudio)

Posted: Wed Sep 16, 2020 5:25 pm
by Basslint
I don't have that book but it's been on my reading list for a lot of time. If only I could buy a DRM-free ebook version of it!

RtAudio is used a lot but depending on what you want to achieve, you might pick something else. If you are interested in developing plugins (instruments and effects), maybe you'd be better off starting with LV2 right away!

Re: Real time audio programming (with RtAudio)

Posted: Wed Sep 16, 2020 8:03 pm
by SpotlightKid
I second the suggestion to look into LV2.

* You don't have to care about audio I/O, the plugin hosts takes care of that.
* Same for MIDI I/O.
* You don't have to take care of mapping/routing MIDI/OSC messages to parameter control, the host manages that.
* You don't have to implement preset storing/loading, the - you guessed it - host takes care of that.

We did a small LV2 programming workshop at our local audio meetup, where we implemented some very simple plugins with the DPF framework. This means you not only get LV2 plugins out, but also VST2 and LADSPA.

https://github.com/osamc-lv2-workshop/lv2-workshop

We also list a few learning resources there, I especially recommend the tutorial series on martin-finke.de and the articles on earlevel.com.

Re: Real time audio programming (with RtAudio)

Posted: Wed Sep 16, 2020 10:23 pm
by milkii
LV2 can also do CV.

Re: Real time audio programming (with RtAudio)

Posted: Thu Sep 17, 2020 7:56 pm
by oscillator
SpotlightKid wrote: Wed Sep 16, 2020 8:03 pm We did a small LV2 programming workshop at our local audio meetup, where we implemented some very simple plugins with the DPF framework. This means you not only get LV2 plugins out, but also VST2 and LADSPA.

https://github.com/osamc-lv2-workshop/lv2-workshop

We also list a few learning resources there, I especially recommend the tutorial series on martin-finke.de and the articles on earlevel.com.
That is a great resource! I looked at some of the files and the framework, and it looks really good. I think you people have talked me into LV2. I can see the potential.

Thank you once again,

Staffan