# VCO.MTH.1

Lesson Summary
Illustrate a Sawtooth/Triangle wave and identify amplitude, frequency, slope, and piecewise linear functions.
Skills
Vocabulary

Slope - a number that describes both the direction and the steepness of the line. Slope is often denoted by the letter m. The direction of a line is either increasing, decreasing, horizontal or vertical.

Piecewise linear function - a function composed of some number of linear segments defined over an equal number of intervals, usually of equal size.

Sawtooth - a periodic and piecewise linear waveform that rises upward an then sharply drops. Contains both even and odd harmonics of the fundamental frequency, and is therefore a useful tool in subtractive synthesizers like the Werkstatt.

Triangle - a periodic and piecewise linear waveform that resembles a triangle. Contains only odd harmonics similar to a square wave.

Exercise

## View and hear a Triangle and Sawtooth wave using the Werkstatt.

For this exercise we will listen to a triangle wave and sawtooth wave on the Werkstatt as well as view both waves with the Waveshape.pde Processing program.

Materials
 Jumper Cables 1 x Arduino Microcontroller

Hardware

The sawtooth wave is provided by the VCO of the Werkstatt.  Simply match the settings displayed in Figure 1.  As you turn the FREQ knob you will hear how the frequency of the wave changes.  The frequency will also change as we press the keyboard buttons.

Figure 1. Sawtooth wave setting

To hear the Triangle wave produce by our Werkstatt we will need to user a jumper cable to patch the LFO OUT to the VCF OUT.  This will allow us to hear the Triangle wave better. First lets switch our Werkstatt settings to match Figure 2.

Figure 2.

Now we can match the jumper settings in Figure 3.

Figure 3.

You will now be able to hear the Triangle wave as you turn the LFO RATE knob.  Notice how pressing the keyboard buttons does not change the frequency, this is because the LFO is used usually as a modulation frequency not a pitched frequency.

Software

For our wave shape viewing exercise we will be using an Arduino to speak to the program Processing.  The Arduino should already have the Standard Firmata sketch uploaded to it. For more detailed information on the Arduino uploading process visit their website

Open Waveshape.pde, ensure that the jumpers are connected in the configuration displayed in Figure 4. and press the run button.

Figure 4. VCO waveshape configuration

We should have a window pop up similar to that of Figure 5.  Notice how wave shape changes as the LFO RATE knob is turned.

Waveshape.pde allows for the user to define what color in RGB, and line thickness (stroke) are used for the wave in the function drawWave.

Waveshape.pde also allows the user to zoom in and out as well as pause the wave animation.  These can be controlled by pressing the arrow keys.

↑  Zoom In

↓  Zoom Out

←  Pause Animation

→   Play Animation

Figure 5. Waveshape.pde popup window

Figure 6. Screen capture of Waveshape.pde open in Processing

Processing is an open source programming environment and community.

moog_werkstatt processing_files.zip

The Arduino is a micro controller and programming environment for interactive systems.

Standard_Firmata.zip

Practice
Subject
Unit