Real time audio programming (with RtAudio)

Programming applications for making music on Linux.

Moderators: MattKingUSA, khz

Post Reply
User avatar
oscillator
Established Member
Posts: 288
Joined: Sat Jan 17, 2015 6:07 pm
Location: SWEDEN
Contact:

Real time audio programming (with RtAudio)

Post 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
MusE DAW running on Debian 10 Stable/XFCE4.
https://oscillator.se/musik

Basslint
Established Member
Posts: 509
Joined: Sun Jan 27, 2019 2:25 pm
Location: Italy

Re: Real time audio programming (with RtAudio)

Post 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!
The community of believers was of one heart and mind, and no one claimed that any of his possessions was his own, but they had everything in common. [Acts 4:32]

Wanna make music on openSUSE? Check out GeekosDAW!

User avatar
SpotlightKid
Established Member
Posts: 173
Joined: Sun Jul 02, 2017 1:24 pm

Re: Real time audio programming (with RtAudio)

Post 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.

User avatar
milk
Established Member
Posts: 272
Joined: Tue Jan 05, 2016 9:08 am
Location: Edinburgh
Contact:

Re: Real time audio programming (with RtAudio)

Post by milk »

LV2 can also do CV.
they/them ta / wiki.thingsandstuff.org/Audio and related pages - a collection of mostly Linux and free links / Linux Digital Audio and Music Workstation Comparison Matrix - collaborative Google Sheet (slightly broken, no time/cpu power to fix here)

User avatar
oscillator
Established Member
Posts: 288
Joined: Sat Jan 17, 2015 6:07 pm
Location: SWEDEN
Contact:

Re: Real time audio programming (with RtAudio)

Post 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
MusE DAW running on Debian 10 Stable/XFCE4.
https://oscillator.se/musik

Post Reply