-
Notifications
You must be signed in to change notification settings - Fork 12
Getting Started
This tutorial assumes that you have not written any "serious" C++ before but have like me programmed some in artist oriented programming languages like SuperCollider, Processing, OpenFrameworks or PD/MAX. The Tutorial isn't really an in depth C++ tutorial which I don't want and am not qualified to write. Since I am not really a very skilled or experienced C++ programmer it is not an authoritative guide but rather a look at a learning process from within. It documents my journey from a relatively finished concept and prototype in SuperCollider to a working VST/AU plugin. So I will often reference the process of "porting" the program from SuperCollider to JUCE.
Some knowledge in digital audio might come in handy but I'll try to keep the technical details as sparse and simple as possible.
Granular synthesis is a form of sound synthesis in which very short sounds called grains are arranged into a more or less continuous stream of sound. The notion of discrete sound particles was first introduced by Dennis Gabor (1900 - 1979) in an attempt to devise a way to analyze sound. The first musical works working with the technique were composed by Iannis Xenakis (1922 - 2001) influencing composers like Horacio Vaggione or Curtis Roads.
JUCE can be obtained from the JUCE Website or from the JUCE github project. JUCE is free for open source projects but if you want to keep your source closed you will have to get a commercial license. Before starting with this Tutorial I recommend following at least the "Getting started with the Projucer" tutorial and the "Create a basic Audio/MIDI plugin Part 1" tutorial. For Linux users there is also a handy list of all the dependencies you'll need.
If you want to learn a bit of C++ beforehand I can recommend this "LearnCpp.com" tutorial as well as cplusplus.com as a general resource.
Once you are comfortable with your IDE of choice and the Projucer as well as the Plugin-Host you can start by making some plans.
Because I started out with a working prototype that had all the features that I wanted to implement I first thought about which of these features I wanted to have in the plugin version of the program and which I wanted to discard. For me JUCE isn't really a platform I would prototype on (yet?) so I think it's worthwhile to prototype in a more forgiving environment where you don't really have to worry about small changes breaking everything.
For me this platform was SuperCollider. I have implemented granular synthesizers in PureData and MAX but chose SuperCollider for it's flexibility and because I suspected it being a little easier to port to JUCE. SuperCollider is text-based so for me the path to C++ seemed to be a bit shorter. In hindsight this was only true for some of the very high level functions. A much more important advantage was that SuperCollider is open source. Because of that I was able to look at solutions to some programming and signal processing related problems I had no immediate solutions to. Looking into the SuperCollider source was especially helpful when implementing the grain envelope.
So let's talk a bit about the prototype in the next chapter and what I wanted to accomplish with it before getting into the C++ / JUCE implementation.