Zum Hauptinhalt

Lesson 7 - FM synthesis and introduction to filters

Abschlussbedingungen
Introduction to the classic synthesis algorithms: generation of complex waveforms via the frequency modulation technique. Basic audio filtering with vcf~ object.

Lesson 7:

edu sharing object


Transcript

00:08 - Lesson 07. FM synthesis and introduction to filters. 00:14 - In this tutorial I am going to present you with Frequency Modulation synthesis, and some useful techniques to gain control over the generated sound. Frequency Modulation, or “FM” for short, is a change in the frequency of one signal caused by modulating it with another signal. Frequency modulation, together with amplitude modulation and additive synthesis, is among the easiest and best sounding algorithms to implement, due to the capability of generating complex waveforms. In the audio field complex waveforms are perceived as more “rich” and “defined” in terms of sound, due to their high number of harmonics. In the patch we are going to implement, the frequency of a sinusoidal “carrier” wave is varied continuously with the output of a sinusoidal modulating oscillator. The “modulator” is then added to the constant base frequency of the “carrier”. 01:13 - What does that mean? Let’s look at it together by opening a brand new patch. We know that we need two oscillators, so let’s create them. 01:33 - We also need a couple of “numberbox” objects to set the “FM carrier” frequency and the “FM modulator”. 01:50 - Let’s also use some comments to remind us what we are doing. 02:02 - We know that the signal coming from the “modulator” needs to be added to the base frequency of the “FM carrier”. So let’s take the “numberbox” and use it to set the “FM carrier” and instead of connecting it directly to the “carrier” oscillator we need to add this number to the signal coming from the “FM modulator”. How we do that? We need a “+ (tilde)” which we are going to connect like this. 02:34 - I didn’t set the right operand yet. That should be the signal coming from the “FM modulator,” as we said, because this signal needs to be multiplied beforehand. So let’s do it by using a well-known “multiplier”. Why are we doing this? Because in “FM” synthesis the amplitude of the “modulator” determines the intensity, or the effectiveness of the effect. 03:04 - We can now take another “numberbox” to control the intensity and also comment this. 03:24 - Great, this is the algorithm that implements “FM”, but we cannot play with it yet, because we need to build the volume control and the exit path to the sound card, so let’s get it done. By now you are quite an expert. Instead of creating this from scratch, let’s copy some objects from the patch we developed to implement the additive synthesis. 03:49 - So, I select the “slider”, the “line” and its message, the “multiplier” the “dac”, and I copy & paste them into the new patch. 04:11 - Now I can close the additive synthesis patch, otherwise when we turn the audio on, this old patch would also sound. Let’s connect the volume control like this. And now we can listen to how "FM” sounds! 04: 44 - As you can hear the sounds we are producing are richer than before. 05:12 - Let’s move one step further. We could say that the sound we get from this synthesis technique is so rich that we might want to use only a part of it. What am I talking about? I am talking about filtering! What does it mean to filter? Well, filtering means that, at the moment, we have a signal, rich with different frequencies, and we want to filter some of them, but how? Using a device that passes frequencies within a certain range and attenuates, in terms of volume, frequencies that are outside of that range. An object capable of this is “vcf (tilde)”, let’s create it, initialized with 1 and check the help file. 06:00 - As you can see “vcf”, or “voltage control filter, has two outlets. The right-most outlet passes all the frequencies below a certain threshold which is set by the central inlet. This behaviour takes the name of “lowpass” filter. The left-most inlet takes the signal that has to be filtered. ( 06:28 - The left-most outlet lets pass all the frequencies around a centre frequency. This behaviour is called “bandpass” filtering and is the one we are looking for. This is all we need to know for the moment. Digital filters are a huge and complex topic and the behaviours we described above are not the only available ones a filter algorithm is capable of, nor is “vcf” the only available filter object inside Pure Data. There are actually several other kinds of filter behaviours such as highpass, notch, morphing filters and so on. For a basic understanding of the topic, the wikipedia page “Filter (signal processing)” is an excellent starting point. 07:15 - Let’s go back to our patch and integrate this new object into the patch as follows. 07:29 - We use the first outlet because we want to use it as a “bandpass” filter. Why do we want to use a “bandpass” filter? Because since the incoming signal is so rich, we would like to highlight different frequency ranges each time we change the centre frequency. 07:50 - We still cannot hear anything because we need to set the centre frequency. In order to do this it wouldn’t be enough to use a “numberbox” as we’ve done up to now because the centre frequency needs to come from a signal, not a number. But how can we transform a number into a signal? We need to use this object, “sig (tilde)” and connect it like this. 08:18 - Now the number in the number box is transformed into a signal that oscillates at this rate in the range from -1 to +1. We are now ready to play with it. 09:17 - The results are really rich and interesting and it’s astonishing to see how much we achieved starting from scratch and just by using basic objects. You should be proud of yourself! With this tutorial ends the first part of the series. From the next tutorial onward we will see how we can control sound generation using data coming from external sensors, such as those available in smart devices. The idea is to use the synthesis techniques we implemented so far and control them using a smart device instead of mouse and keyboard, with the goal of coupling body movements and control over the synthesis process. Don’t be afraid, it will be easier than you might be thinking!



Example Patch:

 

edu sharing object
 

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