Zum Hauptinhalt

Lesson 5 - Additive synthesis

Abschlussbedingungen
Introduction to the classic synthesis algorithms: additive synthesis and how to control several parameters at once.

Lesson 5:

edu sharing object



Transcript

00:08 - Lesson 05. Additive synthesis. In this tutorial we are going to cover the principles and techniques behind additive synthesis, one of the most basic synthesis techniques. The word “synthesis” means that we are going to generate sounds, even complex sounds starting from scratch, thanks to the implementation of different algorithms. The word algorithm is a technical term that can be translated as ‘set of instructions.’ 00:36 - Additive synthesis is a sound synthesis technique which creates timbre by adding sinusoidal waves together. It is conceptually straightforward and very easy to implement. This will allow us to use some new objects as well as using objects we already know in a new way. According to the theory any complex sound can be recreated through the sum of a virtually infinite number of sinusoidal waves. We will see that this is only partially true, mainly due to the limitations of computational power and approximation. Let’s look at how to implement this technique starting from a brand new patch. The core of the patch is the oscillator of sinusoidal waves which we already know: “osc (tilde)” so we create one of these. 01:24 - Then we create, let’s say, fourcopies of the oscillator. 01:38 - These oscillators will compose together our new timbre using additive synthesis. Create a “dac (tilde)” to go out to the sound card. 01:52 - Create a general volume as we learned before. 02:05 - We will also add a “slider”,set the range from 0 to 1 in its properties, create a “line (tilde)” and a message for the “line” in order to create a ramp of 100 milliseconds . 03:07 - We won’t hear anything because our oscillators need to be tuned. In order to do that I take a “number box” and connect it to the first oscillator. Usually in additive synthesis the oscillators are tuned to different frequencies. These frequencies usually relate to the first frequency which takes the name of fundamental frequency. We can also write this down beside the “number box” using a so-called “comment”. To create one, type ctrl_5/cmd_5 or, from the “Insert” menu, select “Comment”. 03:54 - What kind of relation do the other frequencies have with the fundamental? If we multiply the fundamental frequency by integer numbers we will have a ‘harmonic’ timbre, but if we instead use floating-point numbers the timbre will be said to be “inharmonic”. Let’s try to implement a “harmonic” relation by multiplying the other oscillators by 2, 3, 4 and 5, respectively. 04:58 - In this way we can then connect the “number box” to the multipliers to set all the frequencies at once. 05:14 - We are almost ready; one thing is still missing. We need to consider that each of the oscillators go out with a signal that has a volume of 1. This means 5 oscillators will sum together and we will end up creating distortion. Therefore what we need to do is to reduce the volume of these oscillators to prevent the distortion. To do that, as we already know, we need to multiply the signal by a number smaller than 1. 05:59 - Let’s create 5 multipliers and connect them to the general volume and to each oscillator. 06:55 - Often in additive synthesis each sinusoidal wave we create has a decreasing amplitude starting from the fundamental wave. We won’t do this, because we don’t want to deal with fixed values, but in order to gain more flexibility, we would like to set each volume dynamically and independently. To do this it will be enough to copy and paste (ctrl_C/cmd_C, ctrl_V/cmd_V) the “slider”, the “line (tilde)” and its message in between for each oscillator, like this, and then to connect them to its multiplier. 08:13 - We are finally ready to listen to the result of the additive synthesis algorithm we implemented. Let’s first set a fundamental frequency in Hertz values, gently increase each volume a tiny little bit and also raise up the general volume, like this. 08:41 - We can now adjust the volumes of the oscillators to listen to different timbres and we can also set a different fundamental frequency if we like. 08:58 - A nice exercise you can try to do now, for example, is to adjust the volumes of the different oscillators in order to get closer to the timbre of a real instrument you are familiar with. For example, we can create a complex waveform that resembles the timbre of a clarinet by raising the volume of only the oddnumbered oscillators. 09:25 - There are still a couple of things we can do to refine our patch and get even more interesting results. Now, the relationship of pitch between the different oscillators is fixed and defined by the arguments of the multipliers. We could connect to the cold inlet of each multiplier a “number box”. 10:33 - Now we are able to define different relations, even one which we had previously called “inharmonic”. This is possible because we remember, from the first tutorial, that whatever value is sent through an object’s cold inlet will overwrite that object’s argument, e.g. consider the multiplier object. Let’s try to play a little to listen to some results. 11:33 - As long as we keep using integer values we are still in the “harmonic” domain; let’s now try with floating-point numbers. To set a floating-point number in the “numberbox” using the mouse instead of typing it, you need to press the “shift” key and scroll up or down. Let’s now play with that. 11:57 - And last but not least, never underestimate the power of a graphic representation, to better grasp the concepts explained. 12:06 - Let’s open the patch we made in the previous tutorial. And here we select the “tabwrite”, “bang” and “canvas” objects to display the result. 12:24 - Let’s copy & paste them into the patch we are working on right now and connect the output of the general volume to the inlet of “tabwrite”. 12:46 - I could also have created the visualization part from scratch, without opening the previous patch. Since Pure Data is a modular environment, often it is just as fast and easier to copy & paste part of an already implemented algorithm. 13:03 - This is true even if, let’s say, you would like to automate the volume settings of each oscillator as we did in the previous patch. Just try it! Let’s keep playing a little, and visualize the result. 14:00 - If you remember in the previous patches we always dealt with sinusoidal waves and thus visualized sinusoidal shapes. You can now see that the shape of the waveforms we summed up together produce a more interesting graphic representation. 14:16 - This is what a complex waveform might look like. In the next tutorial we are going to implement a new kind of synthesis.



Example Patch:

 

edu sharing object
 

Zuletzt geändert: Dienstag, 12. September 2023, 18:15