I'm a newbie willing to learn coding my own plug-ins. I programmed for many years in Basic/Visual Basic and I recently started learning C++. I also know quite a lot about synthesis and audio in general, but I don't know where to start coding some DSP. I know it's going to take time, but I'm really motivated (and luckly I have lot of free time I can use). I was really inspired by Michael Norris plugins (powerful stuff but no GUI).
Anyway, after reading a lot of threads here I managed to get the IntroJucer working with a basic Hello World! I also managed to add a button and a knob but I don't know how to make them do something.
For example how can I control the gain/volume/pan/whatever with that knob?
Are there any examples of "simple" effects with few controls? Something like a delay or vibrato/tremolo? Or someone willing to explain what should I do to get there?
Many thanks to Jules for making something so awesome. When I saw my "Hello World!" loading in the DAW I must have looked like a baby in a candy store :)
I found this really simple tutorial that could be useful to newbies like me: http://audioplugintutorial.blogspot.it/
I also managed to do some alternative ways of applying gain:
float* samples = buffer.getWritePointer(0);
const int numSamples = buffer.getNumSamples();
for (int i = 0; i < numSamples; ++i)
{
samples[i] = samples[i] * gain;
};
Now what can I do to the samples to get some basic effect (tremolo, vibrato, filtered)? I guess I can use math to alter the content but I don't even know where to start.
This is a good reference for all audio-related software stuff, try to flip through it at a library.
Regarding online documentation the STK tutorials are quite good for grasping the basics of it.
Note that they deal with offline processing first (e.g. from/into WAV file). I really think that it is worth thinking to it first, since this way you won't have to deal with real-time issues.
Once you get how the plumbing works, dive into STK code and see how they do what they're doing - synthesis, filtering, etc.
edit: they do deal with real-time using RtAudio, which is still easier than audio plugins debugging hell.