You are on page 1of 3

Reaktor For You Community - Basic waveforms and their modifications 8/2/09 3:59 PM

reaktorforyou
Reaktor For You Community
Native Instruments Reaktor Community

Basic waveforms and their modifications


reaktorforyou April 1st, 13:45

Today I'm going to show you little math magic using basic built-in math modules that will allow you to make
various waveforms from basic ones. Basically it can be considered to be short tutorial through basic
waveforms and how one waveform can be modified into another. Although I prefer working with core cells on
that problem, I will start with built-in modules, because it doesn't matter what level to use if it comes up to
understanding of basic principles.

Basic waveforms

You must have heard of them already, but I will remind you once more. There are 4 basic waves:

1) Sawtooth (or Saw)


2) Square (or Pulse)
3) Triangle
4) Sine

If you want to get exact definitions of each one, you should look at this article:

en.wikipedia.org/wiki/Waveform (http://en.wikipedia.org/wiki/Waveform)

Actually all of four waves can be used to produce one or another using mathematical approach, as you've
probably already mentioned.

We won't get too deep inside nature of each wave. This is going to be in my future tutorials, when we're going
to build all four waveforms from scratch in core. Now you will need to understand that each waveform
produces shape with it's own frequency (or pitch in musical terms) and amplitude.

Making Pulse waveform with Pulse-width out of Sawtooth waveform

We'll start by building Pulse waveform (pulse) from Sawtooth waveform (saw). Actually, I could choose any
other waveform to produce square wave, as it only accepts two values if you look on its shape - maximum of
amplitude value and minimum of amplitude value with specified frequency. Pulse-width is length of space
between that maximum and minimum values. That means that if original wave (whatever it is) is more than
pulse-width is produces amplitude, if it is less than pulse-width it produces -amplitude. Let's try to build it in
Reaktor.

http://reaktorforyou.livejournal.com/4443.html Page 1 of 3
Reaktor For You Community - Basic waveforms and their modifications 8/2/09 3:59 PM

First, insert simple sawtooth oscillator (Built-in Module -> Oscillator -> Sawtooth). Attach Note Pitch to P input
and 1 to A. In our case amplitude is going to be 1. Indeed, we could have used Gate input, but it depends on
velocity value and the amplitude is usual going to be float number not equal to 1, which makes our structure a
bit harder to implement. We're going to start with simple configuration, although you can attach Gate input in
the end of your structure using multiplier module.

Okay, in our case with amplitude 1 sawtooth waveform will range from values -1..1 (if you look on its
waveform you'll see this). Let's insert Compare module from Built-in Module -> Math. Now we need to
implement following - if sawtooth wave more than pulse-width 1 will go through, overwise -1 will go through.
You should understand, that pulse-width should range from -1..1 as well, because our algorithm won't work
other way (imagine what will be if it is going to be more than 1 - always 1 will go through).

Pulse-width knob is going to be connected to B input of Compare and Sawtooth output to A. Now we'll have
on output ">" of compare module 1 or 0, same with output "<=". If we want to implement exactly what we
want - we will need several modules and more complicated structure, because we need to use both inputs of
compare module (">" should give values of 1 and "<=" -1). Here comes math wizard. With only one output ">"
of compare module we can get pulse wave - multiply on 2 and subtract 1. Just imagine with have value of 0.5
coming inside compare module in some period of saw wave. Pulse-width is set to 0. We're going to have 1 on
">" output. 1*2-1=1. In case of -0.5 we're going to have 0*2-1=-1. This is the most optimal solution in our
case. Although we could subtract -0.5 and multiply by 2 which is going to be the same, but there is module
called Mult/Add in Built-in Modules -> Math that performs a*b+c. In our case b is 2 and c is -1. Your structure
will look like this:

(http://pics.livejournal.com/reaktorforyou/pic/0000yya9/) Don't forget to multiply your wave with Gate module.

Building Triangle and Sine waveforms from Sawtooth waveform and


problems of transfer between them

I won't describe this process like in previous section, instead I'm going to explain how we are going to convert
waveforms. Part of triangle waveform, if you look on its shape, is absolute value of saw wave. First, what we
need to do is get rid of negative values and you will have triangle waveform, but only with positive shape. It
will have values of 0..1. All you need to do is to multiply is by 2 and subtract 1 - same what we did with pulse
wave, but without compare module. Yes, you will get as result right wave, but with wrong antialiasing filter.
You'll see that there is some noise on upper frequencies appears. I suggest you to read about antialiasing
problem, but we won't dig into it now, as it is too complicated to be mentioned in current article. I'm planning
to discuss it later when we'll make waves in core cells. Sine wave is the hardest one to get of sawtooth
waveform, indeed if you're looking for quick ways to do it - just use Sin module in Math for this (saw output on
input). The other way will be discussed in next tutorials for core cells.

Now everything is limited with your imagination only. You can get any kind of interesting complex waveform by
combining several of them. Try to play with four basic waveforms to get interesting sounds.

I hope that was helpful for basic knowledges of four basic waveforms! We're going to move further in next
http://reaktorforyou.livejournal.com/4443.html Page 2 of 3
Reaktor For You Community - Basic waveforms and their modifications 8/2/09 3:59 PM

I hope that was helpful for basic knowledges of four basic waveforms! We're going to move further in next
tutorials in few weeks.

: zootook: Nice post.


The "pulse created by saw waves" is used in analog hardware(!) on the Rhodes Chroma synth (designed by ARP)
from 1981.

You can also create a saw by phase modulate a sine by itself. See my Synthi AKS imitation Synth-in-a-case in the
UL.
: reaktorforyou: Really? I didn't know that. I'll try add this to my post when I try it in Reaktor. I have to check
your synth in a while as well. Thanks for your comments!

ADVERTISEMENT Customise

Free Technology News FSTA Direct Rite in the Rain Paper


Browse Our Technology & IT Articles Food Science & Technology database Al Weather paper Products with
Online. Subscribe to Weekly Report! Apply for a FREE trial Personal Customer Service
www.ITBusinessEdge.com www.fstadirect.com www.TrailExplorers.com

http://reaktorforyou.livejournal.com/4443.html Page 3 of 3