Real time audio programming (with RtAudio)

Programming applications for making music on Linux.

Moderators: MattKingUSA, khz

Post Reply
User avatar
oscillator
Established Member
Posts: 1127
Joined: Sat Jan 17, 2015 6:07 pm
Location: SWEDEN
Has thanked: 725 times
Been thanked: 296 times
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 11 Testing/XFCE4.
https://oscillator.se/musik

Basslint
Established Member
Posts: 1511
Joined: Sun Jan 27, 2019 2:25 pm
Location: Italy
Has thanked: 382 times
Been thanked: 298 times

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]

Please donate time (even bug reports) or money to libre software 🎁

Jam on openSUSE + GeekosDAW!
User avatar
SpotlightKid
Established Member
Posts: 250
Joined: Sun Jul 02, 2017 1:24 pm
Has thanked: 48 times
Been thanked: 54 times

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
milkii
Established Member
Posts: 477
Joined: Tue Jan 05, 2016 9:08 am
Location: Edinburgh
Has thanked: 92 times
Been thanked: 91 times
Contact:

Re: Real time audio programming (with RtAudio)

Post by milkii »

LV2 can also do CV.

they/them ta / libreav.org / wiki.thingsandstuff.org/Audio and related pages / gh

User avatar
oscillator
Established Member
Posts: 1127
Joined: Sat Jan 17, 2015 6:07 pm
Location: SWEDEN
Has thanked: 725 times
Been thanked: 296 times
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 11 Testing/XFCE4.
https://oscillator.se/musik

Post Reply