The Sinusoid

week1 - prev - next

image

Why Sinusoids?


Digital Representation of Signals

Digital signals are sequences that are indexed by n, which is called the sample number n

Sequence of indices

The indices of the sequence can be represented like this:

 ..., n-2, n-1, n, n+1, n+2, ...

Sequence of values

To obtain the actual values of for these indices, we need a function, call it f, of the sample number.

A function is a mathematical term that defines a relationship between two sets, in this case, a sample number n and its output value, denoted f(n).

So, our Sequence of indices above becomes an indexed sequence of values, like this:

 ..., f(n-2), f(n-1), f(n), f(n+1), f(n+2), ...

The sine function

Given that the sinewave is an example of an audio signal, we need to find a function we can use. Luckily for us, we can make use of our trigonometry chops to use the sine function.

image

We can use the sin function in place of the f function above and it will give us the sine wave:

 ..., sin(n-2), sin(n-1), sin(n), sin(n+1), sin(n+2), ...

Here's a nice visual representation by Jack Schaedler


Formally, we still need a few tweaks to the sin function above. So, the actual sinusoid needs to have all the following parameters:

f(n) = a • sen(ωn + ø)

Where:

image


How to make a sinweave in Pd

image

This patch is real, open it with Pd here.

Go to Using Pd for a recipe.