As part of my MSc Acoustics and Music Technology in University of Edinburgh, I undertook an Audio Programming course mainly focused on C++ development and the JUCE framework. The brief for the final assignment, worth 60% of the course mark, was to implement a working audio plugin to demonstrate skills leaned on the course.

For my submission, I implemented a velocity sensitive subtractive synthesiser with two primary oscillators, a noise oscillator and an LFO that could control a number of parameters. Each oscillator can be set to a number of different wave shapes. There is also a switchable low/high pass filter with an ADSR envelope and an amplifier section with an ADSR envelope and distortion effect. Finally, the synth included built in ping pong delay and reverb effects. The plugin is built on the JUCE framework and makes particular use of the JUCE ADSR envelopes and Reverb effects. All parameters can be automated and saved as presets.

The code for this assignment as it was submitted can be seen on GitHub.

Samples

Below are a number of samples of the plugin being used and some discussion of how they various components are used to make sounds in the samples.

Organ with delay

This first sample creates an organ like sound. Both primary oscillators use what I called a push square wave shape. This is a sine wave that is amplified and passed through a tanh function. The higher the push value the more the sine wave is amplified, creating a more square like wave with rounded corners. The second oscillator is also tuned an octave below the first with the LFO modulating the cents to give a little extra thickness to the sound.

The delay is used to add a little echo that almost acts as a double hit on each note adding extra depth to the sound in addition to a little bit of reverb.

Flute using noise

The noise oscillator gives the option to add some noise on key press that can help to sound more natural in a subtle way. The two examples below of a flute like sound are identical other than the inclusion of the noise oscillator. The addition of noise is intended to emulate the breathy sound a player might make while playing.

Cinematic pad

This example makes use of long envelope values and the LFO to create a cinematic pad sound that evolves over time. The long attack and decay time means the sound initially soars but fades in intensity over time. In addition to the envelope, the LFO also modulates the filter frequency to add a little bit of warble to the sound.

The amplifier section also has a significant impact on the sound of this instrument. The envelope works similarly to the filter with the long release helping the sounds blend together between notes. This also illustrates how the velocity affects the sound. It is applied to the the sample before being passed through the distortion so as the key is pressed harder we can hear the softness or harshness of the sound change.

Parameter automation

This example demonstrates the automation of some of the parameters to create a pretty chaotic sound. The LFO is set to modulate the frequency of the main oscillator and then the LFO’s own frequency and depth are modulated via parameter automation.

Drums

It is also possible to create drum like sounds with this instrument by using very short envelope values, low tuned oscillators and the noise oscillator. The noise oscillator has a low pass filter with a single frequency parameter that can be used to change the colour of the noise. In this example it is set quite high for the snare drum sound and much lower for the kick drum sound.

Snare drum noise section

Kick drum noise section