# VCF.TECH.4

Lesson Summary

Combine filter, VCO, and interval knowledge to create an arpeggiator.

Skills
Vocabulary

Frequency - The number of cycles per unit time.  The SI unit for frequency is hertz (Hz), named after the German physicist Heinrich Hertz; 1 Hz means that an event repeats once per second. Designated by a lowercase f.

Hertz - The unit used to represent frequency (Hz)

Pitch - A particular frequency of sound used in a musical context.

Note - A named pitch, in western musical notation we knows these as A, B, C, D, E, F, and G.

Semitone - The smallest audible change in western musical notation.

Interval -   The difference between two pitches. Values are as follows: unison, minor 2nd, major 2nd, minor 3rd, major 3rd, perfect fourth, tritone, perfect fifth, minor 6th, major 6th, minor 7th, major 7th, and octave.

Arpeggio - A musical technique where notes in a chord are played in sequence, one after the other.

Arpeggiator - The synthesizer function in which an arpeggio is played based on specific interval values.

Array - A list of values used in a programming language to specify a variable that can be indexed.

Resistor - An electronic component that restricts the flow of electrical current and voltage. R1 = Resistor, R2 = Variable Resistor, R3 = Potentiometer.

Capacitor  - An electronic component that stores and discharges the flow of electrical current and voltage. C1 = Capacitor, C2 = Polarized Capacitor, C3 = Variable Capacitor.

Circuit - A group of individual electronic components connected by conductive wires or traces which electric current can flow. The combination and order of components allow various tasks to be performed.

Low Pass Filter - A filter that passes low-frequency signals and reduces the amplitude of signals with frequencies higher than the cutoff frequency.

RC Filter - A simple filter circuit using a single resistor and capacitor wired in series.

Exercise

We will be using our combined knowledge of the VCO, low pass filters, and musical intervals, to create an arpeggiator/sequencer for our Werkstatt.

Materials
 1 x 10kΩ Resistor 1 2.2uF Capacitor Jumper Cables 1 x Arduino
Hardware

First we need to create a low pass filter for our Arduino.  Even though the Arduino features a function namedanalogWrite, it is not really able to send a true analog signal.  Instead the Arduino sends a PWM (Pulse Width Modulation) signal, and emulates an analog voltage change by changing the duty cycle.  The analogWrite function takes an input value from 0-255 and sends a 5V+ signal with a duty cycle corresponding to the input value.  Although this technique may work for LED's and other components, we will need to filter our signal to achieve a true analog signal for our Werkstatt. The simple RC filter with one 10kΩ resistor and one 2.2µF capacitor will do the trick.  We will be sending the signal from our Arduino into the Werkstatt's VCO EXP IN.  Observe Figure 1 for exact jumper connections.

Figure 1. RC filter coming from Arduino to the Werkstatt's VCO EXP IN.

We need to use a PWM capable output pin on the Arduino.  Notice on the Arduino next to the number 6 pin there is a small ~.  This symbol indicates that it has the ability to send a PWM signal, and therefore we can use the analogWritefunction.

Now that our circuit is complete we are ready to open the Processing program Arpeggiator.pde.

Software
For our arpeggiator  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.

Arpeggiator.pde works by cycling through two arrays at the same index. Before we can reliably use the Arpeggiator.pde sketch for this task we need to tune the VCO EXP IN.  There will be a trimmer pot on the Werkstatt that needs to be calibrated when running the stock settings of Arpeggiator.pde .  These two values need to be a perfect octave for interval accuracy. Observe Figure 2 for an exact location of the VCO EXP TRIM potentiometer.

Figure 2. VCO EXP TRIM potentiometer located at VR5.

Once all jumpers match Figure 1 press the run button in Processing.  You will hear Arpeggiator.pde cycle through two notes, the unison and the octave.  Turn the VCO EXP TRIM knob until the octave is in tune.  Once these two notes are perfect octaves all other intervals will be matched as well.

A quick description of how to interact with Arpeggiator.pde is as follows.

The notes[] array holds any interval you want to access and is referenced as follows: tonic, minor2nd, major2nd, minor3rd,
major3rd, fourth, tritone, fifth, minor6th, major6th, minor7th, major7th, octave.

the note_values[] array holds all note duration information for each corresponding interval in the notes[] array and is referenced as follows:
w, h, q, qt, e, et, sx, sxt, th, sxf. These are defined as:
w = whole
h = half
q = quarter
qt = quarter triplet
e = eighth
et = eighth triplet
sx = sixteenth
sxt = sixteenth triplet
th = thirty second
sxf = sixty fourth

the bpm setting sets the tempo of the arpeggiator in beats per minute.  Arpeggiator.pde comes preset at 100 beats per minute.

Figure 3. Screen capture

Once the arpeggiator is working and tuned, experiment with different array values.  Below is an example of an ascending-descending minor 3rd chord comprised of sixteenth notes at 120 beats per minute.

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

Standards
Subject
Unit