Rick_123 wrote:
Where can I find some examples of very simple plugins so I can see the minimal code structure/setup required?
And where can I find the full API for C/C++ interfacing?
There are many types of plugins, namely VST, AU, LADSPA and LV2.
(There are other mad ones like AAX used by Pro-tools, but that is a whole other sad story).
All of the above are written in C/C++ and can be compiled for the following OS’es:
VST - Windows, Mac, Linux (Note that 32 and 64 bit VSTs exist).
VSTi - used for plugins that generate sound, for example software synths and drum machines.
Audacity does not support VSTi at all.
AU - Mac Only
LADSPA - Linux, Windows, Mac (Mostly used on Linux and easiest to learn and cross compile).
Note that LADSPA has been superseded by LV2, but is still very common.
As far as I know, Audacity ships with one or two LADSPA effects.
(Obviously compiled for the target OS).
LV2 - Only Linux as far as I know, could be wrong.
All of the above require quite a bit of DSP knowledge along with C/C++ experience.
Some like VST, also require a non open source SDK, in this case from Steinberg.
A compiler (and linker) are also required along with header files.
For Windows, Visual Studio is the “normal” IDE to use which includes a compiler.
For Mac, Xcode is the norm, probably uses a modified gcc or clang.
For Linux, you have loads of options and the compiler can be gcc or g++ for C and C++ respectively.
Another gotcha when compiling any of the above types, is selecting the correct CPU type.
By that, I don’t mean just “Intel” but type of CPU such as Core DUO, Celeron, i5, i7, etc
As some don’t have certain instruction sets/extensions that may be required to carry out the DSP code in the plug-in.
All in all, your best bet for now, try go with Nyquist (based on Xlisp).
It has many DSP primitives and functions built in, making your life much easier.
It’s also not a compiled plug-in, so it has other advantages.
One disadvantage, is the Xlisp syntax, loads of brackets, but once you get used to that, it’s pretty easy.