SynthQuest : Build a Synth VST in 7 days


"A musician who can’t create their own instrument ain’t a real one.” Profound, right? Well, if that sounded like something you’d find written on a philosopher's door, trust me, you won’t. I made it up. camera dramatically focuses on my face; Yep, me. But hey, in the spirit of turning words into action, let’s try to create one, shall we? Over the next seven days, we will be diving into the art of crafting a Synth VST from scratch.
Let’s begin by installing the necessary libraries and IDEs. I’ll explain any terms or concepts as we encounter them. Start by downloading the latest official release of the JUCE framework from Download - JUCE. JUCE is a C++ framework for developing Virtual Studio Technology (VST) plugins and audio applications. Now what do we mean by VSTs? I’ll just show you pictures of a synth called Arturia Mini V.
But the thing is that first one is a Physical Synthesizer, and the second one is the Software or VST version. Think of VSTs as digital versions of instruments that work inside your DAW (Digital Audio Workstation) like plugins that act like real synths, samplers, and audio processors. Why do we use VSTs more than hardware version of the same synth? Because:
They are way cheaper.
Super portable - it is just a file not a bulky hardware.
Layering - you can create multiple instances of the same VST and layer sounds.
Automation – when using in DAW, there is no limit for automation/modulation and have your desired sound.
Instead of diving too deep into the whole 'which vs what' debate, let's focus on the exciting part, developing an actual VST. So, after installing JUCE we need an IDE. The IDE that is recommended by JUCE for windows is Visual Studio. And Xcode for mac users. You can download Visual Studio from here.
After installing JUCE and Visual Studio, open Projucer (\JUCE\Projucer.exe) and click on File->New Project->Plug-In->Basic. Then rename your project and click on Create Project.
After Creating the project, open the project on Projucer and open the modules section on the sidebar and click on the + icon to include the DSP (juce_dsp) module as well (we’ll need that to create our synth).
Then, click on the settings icon next to basicOsc and then go to pluginCharacteristics and click on plugin is a Synth and plugin midi input.
After all this, we can finally open our IDE by clicking on the tiny visual studio icon. Mostly we’ll be dealing with 4 files:
PluginEditor.h
PluginEditor.cpp
PluginProcessor.h
PluginProcessor.cpp
Let me quickly explain what each of these files is about. The first one PluginProcessor.h is a header file where we declare the audio processing (DSP) classes, functions, variables. In the PluginProcessor.cpp we implement and write the logic for them. The PluginEditor.h is another header file, but this is mostly related to the GUI of the VST, for example if we want to have a slider for gain. Then we declare it there in the header file and for the implementation or the logic we make use of the PluginEditor.cpp file. You’ll understand better once we start coding our Synth.
Alright let’s try to build the plugin to check if everything is alright (too philosophical). Click on the build button (play icon). The first build might take some time but after that it should only take less than a minute. You should see a window like this.
We are getting a pop up that is saying “Audio input is muted to avoid feedback loop” this is because we are building the VST as a standalone file and there is no input. In the BasicOscAudioProcessor constructor set input as false. Since we're making a Synth VST, we don’t need any input sound from the outside.
Here’s the github repository with the code. I have created a separate branch called synth-quest-1 for the code till here and will continue to create branches for each episode to reduce confusion.
In the next episode, we shall create our first sound, a simple sine wave from a basic Oscillator. Till then arigato, see you in the next one!
Subscribe to my newsletter
Read articles from Harshit Sarma directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
