Idea for this project
As I searched for an idea for this project, I asked myself what kind of object or software I could create that I would be inclined to use in my musical creations. As I sometimes like to play ambient music with synthesizers, I thought that I could create a synthesizer engine and a controller to create unnatural ambience sounds easily. I came up with the idea of a musical drone generating engine, combining different kinds of synthesis techniques and tailoring itself to the room it is located in.
Objectives
Create a sound engine combining different sound synthesis techniques to generate interesting sounds but also to solidify my understanding of these techniques I learned in the MUMT 203 course this very semester.
Use the Arduino to control different parameters of the sound to become more comfortable with this object and its programming environment.
Use different sensors so that the room have an impact on the sound generated.
Design an unusual controller so that the user have to think outside of the equal-tempered musical system to use this synthesizer
Design
This project is composed of three important parts: the sound engine, the controller and the effects. The sound engine and the effects have been implemented using Max/Msp and the controller have been built around an Arduino. The sound engine is composed of five different sound synthesis engines added together. The first such engine is an additive synthesizer that uses 8 different cycle~ objects, which are used as oscillators. They are all used to generate the main frequency inputted and overtones of this frequency, that are sometimes harmonic and sometimes not at all. I designed 5 presets for this engine to use it more easily, but the user can also create its own sound by playing with the overtones multiplicators, the phase offset parameter and the amplitude envelopes.
The fourth engine is a frequency modulation synthesis engine and takes three values as its inputs: the main frequency, or carrier frequency in that system, the modulating frequency and the modulation index.
The second engine is a ring modulator synthesis engine and it is designed in the simplest way possible, such that the main frequency inputted is played by a cycle~ object, then multiplied with another cycle~ object oscillating at the modulating frequency.
The third engine is the simplest of them all and it is simply a single oscillator taking as input the main frequency. It is used to give more presence to the main frequency of the sound in the sound.
The fifth and final engine is an amplitude modulation synthesizer. It can seem as the modulating frequency inputted can go from 20 Hz to 20 kHz but this frequency is scaled down to be in between 0 and 20 Hz as to achieve more of a vibrato effect. As you can see above, the user has control over the relative amplitudes of theses five engines with the five gain slider of the main patch.
The simple engine
As you can observe, all of the cycle~ objects used to oscillate as what I refer to as the main frequency have the word "wave" as an argument. This is because this synth engine is also a wavetable synthesizer, as the patch will give you the opportunity to select a waveform at the initialization. To make it more fluid to use, I recorded a bunch of waves from an analog synthesizer I have to give simple options to the user. These options contain basic sinusoids, triangle, saw, square and many more complex waveforms.
The amplitude modulation engine
There are multiple effects available in the main patch of this synthesizer. They are overdrive, chorus, reverb, a low-pass filter, a resonance filter and a noise engine. Except for the low-pass filter and the noise engine, all of those effects have a dry/wet control to make them easy to use. The overdrive, low-pass filter, resonance filter and noise engine were implemented using the already implemented Max objects for these effects, but the reverb and chorus needed to be "created". For the reverb, I used the Schroeder Reverberator designed by John Chowning that is available on the website of the Center for Computer Research in Music and Acoustics of Standford's University that you can find right here: https://ccrma.stanford.edu/~jos/pasp/Schroeder_Reverberators.html
This is the full implementation of the reverb effect. As it is after the chorus effect in the line of effects, the sound is treated in stereo. You can see the three allpass filters in series followed by the four feedback comb filters branched in parallel. The picture on the left below is the full subpatch called reverb, the middle one on the right is the implementation of the allpass filter and the rightmost one is the implementation of the feedback comb filter, all implemented following the design (as best as possible) from the Standford University website mentioned above. Even the mixing matrix has been implemented, as you can observe below.
The other effect I had to implement by myself was the chorus. For this effect, I mostly followed Max/Msp's tutorial called MSP Delay Tutorial 5: Chorus.
This below is the implementation of the chorus, which is the first effect to give a stereo depth to the sound generated.
The last part of the design of my project is the controller. This controller measures various parameters of the room and shapes the sound by controlling the effects. There are in total four sensors actively feeding data to the synth engine. The infrared receiver calculates the distance between itself and an object or a surface, ranging from 2 cm to 400 cm. This sensor has control over the reverb applied to the sound since reverb is a function of the room size and shape in which a sound is produced. That way, a larger room will generate a sound with more pronounced reverb, where a smaller room will produce a dryer sound. There is a pressure variation sensor that raises the gain slider of the noise generation engine, such that there is a possibility to blow on this sensor to add noise to the sound generated, or the user can make the room pressure increase somehow (I personally put my finger on top of the sensor) to add noise to the sound generated by the engine. A photoresistor is set up such that it controls the cutoff frequency of a low-pass filter. So, using this synthesizer in a place with more light will yield a brighter sound where a dark place will only produce low-end frequencies. The last sensor senses humidity and temperature. It is set up such that the humidity percentage of the room controls the dry/wet parameter of the chorus effect and the temperature measurement controls the dry/wet parameter of the overdrive effect. The controller also features a joystick and a button. The button only serves the purpose of changing the preset of the additive synthesis engine. The joystick records values for the positioning of the part you can move on the X-axis and the Y-axis as well as the state of the built in button. It is set up such that the Y-axis, when the button is not pressed, controls the modulation frequency, which is used in the Frequency Modulation engine, the Ring Modulation engine and the Amplitude Modulation engine, the X-axis, when the button is not pressed, controls the modulation index of the Frequency Modulation engine, the Y-axis, when the button is pressed, controls the main frequency the synthesizer is supposed to produce and finally the X-axis, when the button is pressed, controls the length of the amplitude envelopes of the additive synthesis engine. It is to be noted that in the main patch you can observe at the top of this page, the part of the patch that deals with the incoming data from the controller is a modified version of a patch that was given in the MUMT 306 course called "arduino_2in.maxpat".
Challenges
The biggest challenge I faced was to set up the sensors I bought online, as those required the utilization of the I2C bus, a digital communication protocol working with the Arduino. Also, those came with datasheets made for professionals to use so it took me some time to understand anything about it. I even had to abandon a sensor after a long and tumultuous fight to get it working.
Also, the joystick is pretty imprecise, so controlling frequencies with it is very hard.
Donwloads