DSPRelated.com
Forums

Tutorial: Creating Audio Plug-Ins in C++

Started by Unknown November 17, 2013
Hi everyone,

I'm writing a tutorial series on how to create audio plug-ins using C++ and the WDL-OL Framework. I've finished the first 18 posts, covering topics such as creating envelopes, multimode filters, anti-aliased oscillators, LFOs as well as receiving and processing MIDI and GUI programming. Basically we're building a subtractive synthesizer from scratch. Here's the table of contents:

http://www.martin-finke.de/blog/tags/making_audio_plugins.html

Of course the whole thing is free (donations accepted). I hope this is useful and I'm happy about any feedback :)

Have a nice evening.

Martin
On 11/17/13 10:29 AM, musikbasteln@googlemail.com wrote:
> Hi everyone, > > I'm writing a tutorial series on how to create audio plug-ins using C++ and the WDL-OL Framework. I've finished the first 18 posts, covering topics such as creating envelopes, multimode filters, anti-aliased oscillators,
i skipped ahead to that part, and here is what you have at the moment, Martin: "" How can we generate the best, alias-free wave for a given sample rate? �Best� meaning �closest to the shape we calculated above�. The Nyquist frequency is a constraint that�s expressed in the frequency domain. It doesn�t say �Your waveform shouldn't have spikes that are steeper than X�. It says �Your signal shouldn't have frequencies above X Hz�. So we need to shift our work to the frequency domain. We will do that in a future post, but in the next post we'll look at how we can receive incoming MIDI data. "" anyway, the most general way and computationally *inexpensive* way to deal with non-aliased waveform generation is to use wavetable synthesis, in the style of the PPG or Waldorf. you can easily synchronize wavetable generators, one with fewer harmonics, so that as you go up the keyboard, you crossfade from the wavetable with more harmonics to the wavetable with fewer at the top end. this is the way that these guys do it: https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html also, i have a very old paper on the essential mathematics of wavetable synthesis at the music-dsp site. BTW, you should subscribe to the music-dsp mailing list and post your announcement there, me thinks.
> LFOs as well as receiving and processing MIDI and GUI programming.
i have a very clean and very complete file of C code that parses incoming MIDI bytes. it does *not* dispatch the completed MIDI messages/commands (your synth gets to do that!) but it does all of the parsing of the incoming MIDI bytes and assembles them into a completed MIDI message when the message *is* complete. it is fully compatible with MIDI 1.0 (incl. running status and system real-time) and a couple of updates since regarding time-code. you (or anyone else) can have it for free if you want. i also have some text files (and maybe someone's scanned copy in .pdf) of the complete MIDI 1.0 standard, if you want that. i can't believe how expensive it is to get this "legitimately" from the MMA.
> Basically we're building a subtractive synthesizer from scratch.
you might want to be more general than just subtractive synthesis. but even so, if you want to generate the classic analog waveforms in an alias-free manner, you better look into doing wavetable synthesis, just for those waveforms, even *if* you choose not to use wavetable synthesis for more general musical instrument synthesis.
> Here's the table of contents: > > http://www.martin-finke.de/blog/tags/making_audio_plugins.html > > Of course the whole thing is free (donations accepted). I hope this is useful and I'm happy about any feedback :) >
well, you got some from me!! good luck with this thing. be sure to check out the music-dsp mailing list and repository. bestest, -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."