Due date: Oct. 5, 2016
Lab and Readings
Read and do the first 2 "Getting Started" JUCE tutorials:
as well as the first two "Audio, MIDI & plug-ins" JUCE tutotials:
Assignment: Making an Additive Synthesizer
First, read the Wikipedia page on additive synthesis. Then download the starter code and run it. If everything goes well, you should see the following application:
This is a simple synthesizer based on a sine wave oscillator. Its frequency and its gain can be controlled using
sliders and it can be turned on or off using a checkbox.
For this assignment, you will make your own additive synthesizer. The sine wave oscillator is implemented in its own
Sine.h) and can be easily duplicated. As explained in the Wiki page, the idea behind additive synthesis
is to add the signal of multiple sine wave oscillators together to create complex sounds. There is no rule as to how such a
synth should be controled so this part is up to you. For example, the frequency and the gain of each oscillator could be
controlled by independent sliders. Another approach would be to have higher level parameters that control several oscillators
at the same time.
When you make this synth, think of it as a musical instrument (and of yourself as a luthier). Try different mappings
and explore the "sonic capabilities" of your instrument to create different sound textures. Make it easy to play for a
potential performer. Try to use clean coding standards (e.g. when declaring several oscillators, create an array: don't
Sine sine1, sine2, etc.;).
Optionally, you could try to see how to generate different notes with your synth and automate that process using a random
number generator for example. That's what is called
algorithmic music. In that case, some of the parameters offered to the user could be the speed at which new
notes are generated, their range, etc. Once again, this is totally up to you: just make it musical and make it sound good!
- Adding several sine waves together will very likely create an output signal out of range (1+1 = 2, yes :) ),
so you might have to scale it depending the number of oscillators you decide to use. Remember that the range of
the signal that you send to the DAC should be constrained between -1 and 1. On the other hand, you might like the
generated sound, so may be you want to make it a feature (I wouldn't ;) )! In that case, keep it but mention it
somewhere in your code.
- Your laptop is powerful enough to compute more than 1000 sine waves in real time but it doesn't mean that you
should do it :). 4 finely tuned oscillators will very likely sound better than 100 oscillators used in a bad way.
- An interesting feature could be to let the user choose the number of oscillators (which would imply using
dynamic memory allocation, of course ;) ).
- Package your project and make it available on GitHub (or any other platform you're used to: BitBucket, SourceForge, CCRMA GitLab, etc.).
- Make sure that your code is reasonably well commented.
- Write a quick description/documentation in a README that you will put at the root of the project.
- Make a short demo video of your instrument (<1 minute) featuring a small "composition" and post it on
YouTube (or somewhere else).
- Send the link of your project and video to Romain and Tim.
- Rahul Agnihotri
- Ziheng Chen
- Orchisama Das
- Walker Davis
- Graham Davis
- Cheng Gu
- Matt Herrero
- Mark Hertensteiner
- Dylan Hunn
- Adam Jaffe
- Megan Jurek
- Hemanth Kini
- Paula Kusumaputri
- Nolan Lem
- Yuan Li
- Prateek Murgai
- Michael Olsen
- Mark Rau
- Jeff Setter
- Juan Sierra
- Hanze Tu
- Quint Underwood
- Maggie Xu
- Shenli Yuan