Building a saturation plugin


Hi guys, this is my first post here. Basically I’m a student doing a coding module as part of Music Tech. I’ve been watching the JUCE Programmer on Youtube’s tutorials about building a gain slider, and so far have built one that works logarithmically.

However, I’m wondering if there’s anywhere I could be pointed about building a saturation plugin. I don’t expect anybody to build it for me since I’m being graded upon it, but anywhere that gives a tutorial on building one with an explanation would be helpful, or even a few.

Thanks for reading!


This could be pretty interesting for your purposes… (It does not go into the details of coding a plugin, though.)


Thank you very much!

I also wanted to ask, what exactly is a class and how does parent and child come into this? The tutorials never mentioned such a thing.


Classes and inheritance are very basic programming concepts from the field of object oriented programming. This concept is used by a lot of modern programming languages and it is one of the main features that makes C++ different from C, which is the non object oriented predecessor of C++ (however, you can use C in C++ code). You should have a read on object oriented languages in general and then how C++ does this before getting started with your plugin as this will make some design patterns clearer for you which are obvious to most people here (this is why nobody explains them). Have a lot of fun learning programming - it’s always best to have a practical motivation for that in mind :slightly_smiling_face:


Hi again,

I built a gain slider that works logarithmically. I then used:

channelData[sample] = atan(myVolume*buffer.getSample(channel, sample));

To put saturation on it. But there’s no sound coming out of either end when I apply the plugin to logic. I changed myVolume from a previous function named rawVolume, which used:

channelData[sample] = buffer.getSample(channel,sample) * rawVolume;

Is there something I’m missing?