Home Waveform symmetry and timbre
Post
Cancel

Waveform symmetry and timbre

Introduction

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 out - 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.

sine-fun Fig.1 Sine function symmetry

cosine-fun 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.

Transfer functions and harmonic content

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.

sine-spect Fig.3 Sine transfer function spectrum analysis

cosine-spect 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.

sine-function-wf Fig.5 Sine function waveform

cosine-function-wf 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.

Transforming the symmetry

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.

offset Fig.7 Offset control

We’re using a non-linear transfer function - [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

This post is licensed under CC BY 4.0 by the author.
Contents