Waveform symmetry and timbre
In my introductory tutorial on waveshaping I told you about the possibility of building different waveforms and how that might be musically interesting. For that first tutorial, I used [clip~] to exemplify how waveshaping works, however, there are other ways to produce different transfer functions that you can use for multiple purposes.
In this tutorial I’m going to use [cos~] as a transfer function to demonstrate the relationship between waveform symmetry and tone quality or timbre. What [cos~] does is multiplying its input by 2pi and giving the cosine of the result. An important thing to remember about [cos~] is that it takes its input in cycles, so your input should range from 0 to 1. My patch is based on professor Puckette’s UCSD course, so if you’re interested, I highly recommend you check that, I’ll leave the link on the references section.
First, I’m going to show you visually the difference between a sine and a cosine function.
Fig.1 Sine function symmetry
Fig.2 Cosine function symmetry
As you can see, the “sin” function graph, is symmetric with respect to the origin - if you flip the x to negative x you still have the same y value and the “cosine” graph is symmetric to the y-axis.
A sine function will produce only odd harmonics whereas a cosine function will produce even harmonics. In other words, a sine function will repeat the exact same thing for its subsequent cycles and a cosine function will do one thing for half the cycle and then do the same thing backwards for the other half, like a mirror image. This symmetric relationship is important when it comes to musical intention, since sonically this will produce different results as odd and even harmonics have different tone qualities.
Fig.3 Sine transfer function spectrum analysis
Fig.4 Cosine transfer function spectrum analysis
Note that because of its symmetry, the cosine fuction will double the frequency that we hear. What I did here was using an [osc~] to read from these two different tables and observe the results. I created an Index control and made the signal range from 1 to 100 by multiplying by 50 and then adding 51 and used [tabread4~] to read the table. How I’m drawing these functions to the table here is not relevant to the point I’m making at the moment since we’re going to use [cos~] later.
Fig.5 Sine function waveform
Fig.6 Cosine function waveform
As you can see, the transfer function determines your control over the shape and harmonic content of the waveform. Remember that the harmonics are what makes us differentiate between two different instruments playing the same pitch.
Now I will show you how to add some extra control to your patch, because you can transform the symmetry of the function. There is a help patch that uses the same technique in a different way, E07.evenodd.pd. And this time we won’t need to read from a table, we’re just using the [cos~] object instead.
Fig.7 - Offset control
We’re using a non-linear transfer funcion - [cos~] - and adding an offset control, so you will basically have an even/odd control and transform the symmetry of the waveform, because you are changing the point from where you start reading.
Let’s take a look at the amount of control you can have over timbre with this technique.
You definitely don’t have to know this to make electronic music, however, this kind of knowledge can save you a lot of time in expressing your ideas because it becomes easier to understand how to reach that sound you have in your head.
================================================================================
References:
Russ, Martin. Sound synthesis and sampling. Taylor & Francis, 2004.
Dodge, Charles, and Thomas A. Jerse. Computer music: synthesis, composition and performance. Macmillan Library Reference, 1997.
Links to UCSD course:
https://podcast.ucsd.edu/watch/wi16/mus171wi16/2/screen
http://msp.ucsd.edu/syllabi/171.16w/index.htm